Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add Facebook “Like” Button To Each Post In Thesis Without Plugin
function fb_like() {
if (is_single()) { ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"></iframe>
<?php }
}
add_action('thesis_hook_after_post','fb_like');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.