I have already mentioned about facebook like button for wordpress and in this article we will learn to add like button in thesis theme.

thesis-theme-facebook-like-button

Get Thesis Theme Now

As we all know about Thesis Theme and its content management as well SEO capabilities. Though it is a simple wordpress theme allowing endless customization for wordpress blog. If you don’t have a copy of Thesis Theme then you can download thesis theme here.  If you are using an old version of Thesis Theme then I recommend you to safely upgrade thesis theme.

Add Facebook Like button in Single post

As we all know that Thesis customization is done using thesis hooks which are overriding functions. To show like button in single post, copy-paste the code snippet in the custom_functions.php.

Make sure you take full backup of custom_functions.php file using FTP before modifying it.


function joe_adds_like_btn ()  {
if (is_single()) { ?>
<div style="float:right; margin:0 10px;">
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID));?>&amp;layout=button_count&amp;show_faces=false&amp;width=90&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:90px; height:25px;"></iframe>
</div>
<?php
}}
add_action('thesis_hook_before_headline','joe_adds_like_btn');

Save the custom_functions.php file, once you are done adding the above code. Now upload the edited file on server using ftp client and when you will refresh website, you will find something like in screenshot below.

add-facebook-like-button-in-single-post-thesis-theme

Facebook Like button on Single Post

As we have added facebook like button in thesis theme, we come to the end of this article. If you have any queries then you can post comment below as your feedback.