How to Add Facebook Like Button in WordPress/Website?
You probably reached here after understanding the importance of Facebook Like Button in your Website. This post is useful to add the Facebook Like Button in your website or your wordpress blog. Let’s first get the Facebook Like Button code.
- Go to Facebook Like Button Plugin Page
- Fill in your preferences like the name of your website, Layout, width and the color. Press Get Code
- You will probably get the script like this. Copy the code
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fjoysofprogramming.com%2F&layout=standard&show_faces=true&width=450&action=like&font=lucida+grande&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
Adding Facebook Button to Your Website. Assuming that you know how to open the source code of your website (and Little bit knowledge of HTML). Open the source code of your website home/main page, mostly by the name index.html. Every HTML page has the following structure
<html> <head> ..... </head> <body> ... </body> </html>
You must add the Facebook code between
<body>
and
</body>
The choice is probably left to you. The preferable place is to place it at the top of the web page below the title and the menu (if any) of your website. Adding Facebook Button to Your WordPress Blogs. This is done by adding the above snippet of code to your WordPress theme. You must backup your theme code and be very careful in adding the code. If you own a blog on your own domain, then you can go and edit the wordpress blog theme. There are two places where you can add the Facebook Like Button. One at the top/bottom of your web page and the other at the top/bottom of your sidebar. If you wish to add it to the top of your webpage, you can add the code in index.php. If you add it in the sidebar, you can insert it in sidebar.php
.
- Go to Themes->Editor
- Choose either index.php or sidebar.php
- In index.php, insert the code after the following line
<?php get_header(); ?>
In case of sidebar.php, insert it after
<div id="sidebar">
Now check your website. If there is any issue in opening the website, revert back the changes.
Tags: Facebook, Facebook Like Button, Facebook Like Website, Facebook Like Wordpress
Comments:
On Facebook
Translate









Search
Custom SearchRecent Comments
- Ash on log4cpp::PatternLayout – Available log4cpp log formats
- Joys of Programming on Curl / libCurl Tutorials with Examples
- Malik89 on Curl / libCurl Tutorials with Examples
- Matt on How to install java library for jogl in Ubuntu/Linux?
- Gokulnath on How to install Readline/libreadline in Ubuntu?
On Twitter
Tutorials
Twitter
- And you thought Eclipse is Just for Java Development. You can also use Eclipse for C/C++ development http://t.co/swtOLbkr 3 months ago
- For the C fans here, let's see a simple question. Is there any difference between func() and func(void)? http://t.co/ASTsWVc9 3 months ago
- ISO C++11 released. http://t.co/DyJ0rSa1 3 months ago
- RT @newsycombinator: IE team sends a cupcake for FireFox 5 http://j.mp/lS7pGF 7 months ago
- RT @newsycombinator: Voice search enabled on Google homepage (Chrome) http://j.mp/m5KT8c 7 months ago
Categories