WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the twenty-eleven theme, and want a Facebook-like button.

I insert the code into content-single.php as follows:

At the beginning:

<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/he_IL/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="fb-root"></div>

And then, inside the loop, after the call to the_content():

<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>

The buttons appear fine in FF, Chrome. and IE9, and even IE7(!). But in IE8 - they don't appear at all. The div is there, but it doesn't get filled with the iframe.

When I insert the same code in a twenty-ten theme, it appears fine in IE8.

Has anyone run into this problem? What am I doing wrong?

share|improve this question
up vote 0 down vote accepted

In the end I ended up taking the iframe code instead of the HTML5 code I had taken before, and that solved the problem...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.