Home   Best Sellers   Blogging   Coding & Design   Technology   SEO   Travel & living   Career   Videos   Tips   Calculators     
Home  »     »     »     »  How to add Facebook Like button in WordPress theme and Blogger Blogs

How to add Facebook Like button in WordPress theme and Blogger Blogs

Monday, January 23, 2012

INSTALLING FACEBOOK LIKE BUTTON

Facebook is the fastest growing social networking website. A presense of your website in face book give a good impression to the viewers. If you have lots of followers in facebook, then that shows your site popularity.

Facebook provides "Like Box" service, so that users can link their website to facebook and promote the website contents, Using "Share" and "Like" options contents can be shared across various communities and friend groups in facebook. Once a user "Likes" your website post, immediately the people in the friend groups of th eperson who "liked" your post will get an intimation.
So there is a  chance that several people may look into the "Liked" site and it may  driver visitors to your website.

Adding Like Button to Wordpress Themes

It is very easy to install the facebook like button on your wordpress theme.

Simply do the following:

find the file "single.php" and add the following code in that


<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink()); ?>&amp;layout=standard&amp;show-faces=true&amp;width=530&amp;height=60&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:530px; height:60px"></iframe>




Adding Like Button to Blogger Blog Templates

Login to your blogs admin area and go to Design option in blogs dashboard. Click on edit HTML and select expand widget option. In the HTML contents find the following section:

<b:if cond='data:blog.pageType == &quot;item&quot;'>
..................
.................
....</b:if>


in that section add the following code:

<iframe expr:src='"http://www.facebook.com/plugins/like.php?href=" + data:post.url + "&amp;layout=standard&amp;show-faces=true&amp;width=530&amp;height=60&amp;action=like&amp;colorscheme=light"' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:530px; height:60px' allowTransparency='true'></iframe>

and Save your template.

-- -- -- -- -- -- -- -- --

The above codes for blogger and wordpress are in general format, you can customize it according to your needs. You can change the layout , height , width etc..

If you want to show only the Like count in the button then change layout=standard to layout=button_count. if you want to hide the faces of the people who like your post then change show-faces=true to show-faces=False.

You can also change the color scheme to dark by changing colorscheme=light to colorscheme=dark and other small changes regarding the height and width of the button.

If you are not familiar with how to create a facebook fans page and facebook like box for your website, then read this article :

How to create facebook fans page?

How to create Facebook Like Box Widget?




How to link to this page?
If you wish to link to this page from your website, simply Copy and paste the above HTML code to your web page. It will appear on your page as:
How to add Facebook Like button in WordPress theme and Blogger Blogs.




Share this!




comments powered by Disqus

This Weeks 7 Popular Posts


Subscribe to Recent Posts by Email
Stay connected to CROZOOM with regular Email notices of new Techie articles and IT Jobs. Updates will be delivered to your Inbox as soon as they are posted online.

Enter Your Email Address:  

Delivered by FeedBurner   RSS Feed

Search this Blog   



Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »