Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.