Add Facebook “Like” Buttons To WordPress Blog Without Using Plugins
WordPress Facebook like button or the Facebook share button on your WordPress blog will definitely improve your website or blog’s popularity. Facebook is the leading Social Network service with millions of people are active members. Thousands are joining every day. If you are a blog or website owner, then you can make use of the Facebook to make your blog more popular.
Facebook “Like” button is one of the best shortcut to make your blog post or article popular. If one person likes one post it will be displayed in his profile page. If that person has many friends in his network, most of them will see the Post and this may yield more traffic to your blog from Facebook.
It is always a better idea to provide a mechanism to your users to share your post. Be it Facebook Like or Twitter Tweet or Digg or any other. The more people share your article the more popular your blog becomes. Even search engine gives extra considerations to posts or articles which are popular in social network sites.
Today we will see how to add Facebook “Like” button to your wordpress post or any other pages without using any plugins. In fact the less the number of plugins you use the more faster it becomes.
Add Facebook “like” Button scripts to your blog post .
In wordpress the file which will be rendered as the post page is the ‘single.php” file. This you can see in the themes folder. Once you identified the file, you can add the code given below to the location where you want the Facebook “Like” button to appear. Find the code similar to the below code. If you want to add the facebook “Like” button below the title you can add similar to the below code.
1 2 3 4 | <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ................................................................................... <?php the_title(); ?> YOUR FACEBOOK LIKE SCRIPT CODE HERE |
If you want to add the “Like” button below the post content you can find code similar to the below and add the script.
1 2 3 4 | <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ................................................................................... <?php the_content(); ?> YOUR FACEBOOK LIKE SCRIPT CODE HERE |
Identify the appropriate location inside the loop, like after post header or at the end of the content etc.
There are two Facebook Like button implementations: XFBML and Iframe. The XFBML version is more feature rich but require the JavaScript SDK.
You can choose from three different layout styles.
- standard
1 2 | <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"> </iframe> |
- button_count
1 2 | <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"> </iframe> |
- box_count
1 2 | <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=box_count&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px;"> </iframe> |
- The XFBML verson
1 2 | <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo get_permalink(); ?>" show_faces="true" width="450"></fb:like> |
Here the XFBML version URL defaults to the current page.
Apart from the above layout styles you can also select the width of the like button, color scheme etc. You can read more detailed tutorial in Facebook Like Button reference page.
-
Mark
-
http://www.globinch.com Globinch
-
-
Mark
-
http://www.best-of-european-union.eu/ Julo
-
Binu George
-
-
http://www.shibleysmiles.com Colleen
-
Binu George
-
-
Tamilnadu09
-
http://www.facebook.com/transmute Saksiri Kridakara
Join Globinch on Social Media
Follow Globinch
Popular Posts
- Turn your Windows 7 Computer Into a Personal Wi-Fi Hotspot 20 comment(s) | 26,798 view(s)
- Search Engines for File Sharing Sites : Rapidshare Search, Megaupload and More 2 comment(s) | 18,490 view(s)
- Google Translate Now supports Bengali, Gujarati, Kannada, Tamil and Telugu 2 comment(s) | 17,373 view(s)
- Best PDF OCR Tools to Convert Scanned images to Text / Word Documents 4 comment(s) | 13,751 view(s)
- Google Top Searches Today – Hot Google Search Words today 8 comment(s) | 13,529 view(s)
- Globinch Search 0 comment(s) | 10,429 view(s)
- Access Blocked sites, Unblock Restricted Websites 16 comment(s) | 9,473 view(s)
- Password Revealer – How To Reveal- Show Password Behind Asterisks? 1 comment(s) | 8,523 view(s)
- Play Angry Birds Game Free and Offline in Chrome Browser 1 comment(s) | 8,254 view(s)
- Free Online OCR Software to Convert Images Into Searchable PDF, Doc, HTML or Text 2 comment(s) | 8,092 view(s)
Recent Articles
- Samsung Galaxy Core Features, Specs, Price
- How to Use Wi-Fi the Secure Way
- 5 Apps to Boost Android Performance
- Building a Smarter Site Using a WordPress Platform
- Samsung Galaxy S IV Smartphone :Summary of All the Radical Innovations
- 5 Killer Tips to Increase Traffic to Your Blog
- Domain Parking to Make Genuine Money Online
- SEO Is Not Dead, But You Need to Upgrade The Process
- A Complete SEO Guide on Using Social Media for Better SERPs
- When Should You Use Geotargeting or Setting Geographic Target in Google Webmaster Tools?








