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?