Facebook Like on WordPress, FB with AJAX Content

It has been a multi-hour struggle today to get working Facebook Like buttons on photomagic.biz. There are at least 5 plugins, that all fail to a greater or lesser degree – mostly greater. We’re using a child them of Twentyeleven. The only real changes to the child are reductions is padding and margins. It doesn’t see that those should effect the functionality of buttons.

One detestable thing all the buttons had in common were iframe implementations. Those are basically impossible to style with CSS. I’ve also discover what I believe is a serious flaw in the WordPress plugin model: plugins get to add their CSS after the theme CSS. That basically blows away any consistency. When it means editing the plugin to fix the styling it also breaks the separation of content from presentation.

I wrote a Facebook plugin that works rather well and seems to have more features with less fuss than the others. I did burn a couple hours trying to make it reference the current content on an AJAX updated page. Just as I am calling it a day I find a really useful link on StackOverflow.com on the very subject. For completeness, here is the Google search that turned up the relevant material.

Leave A Reply