How to make WordPress and the Add to Foursquare button play nice together
If you run a WordPress blog, you may have noticed a problem when you try to embed the new “Add to Foursquare” button in a post. If you paste it in the HTML editor, it disappears as soon as you switch to the Visual editor. This is because WordPress’ visual editor, TinyMCE, strips iFrame content by default. Since the “Add to Foursquare” button is embedded as an iFrame, it goes out the window too.
There’s a way to fix it, however, if you have access to the functions.php file included in your WordPress theme. Simply add these lines to the file to prevent TinyMCE from stripping iFrame content alltogether:
// fix TinyMCE for iframes
add_filter('tiny_mce_before_init', create_function( '$a',
'$a["extended_valid_elements"] = "iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]"; return $a;') );
The Add to Foursquare button won’t show up when you switch to the visual editor, but it will when you publish the post.
/Thanks to this post on the WordPress forums for the solution

It’s happening in MovableType blogs too.
Thanks for the tip…I also found the WP Embed Iframe Plugin works as a workaround.
See here: http://uberlocation.com/applications/foursquare-2-0-for-iphone-released
Great little tip. Thanks for posting.
[...] This post was mentioned on Twitter by Sarah Perez, Maddie Grant, Charm City Now, About Foursquare and others. About Foursquare said: How to make WordPress and the "Add to #Foursquare" button play nice together: http://bit.ly/d5FrN9 [...]
You, sir, deserve a medal. I’ve been pulling out my hair over this. Thanks to you I got the button to work. Here’s my post with the buttons added. Thanks again!
Culinary Tour of Montreal
http://www.missadventures.com/2010/09/17/my-culinary-tour-of-montreal/
[...] How to make WordPress and the Add to Foursquare button play nice together [...]
[...] How to make WordPress and the Add to Foursquare button play nice together [...]