As I promised here at How to install the Facebook Like button in Blogger
will write a post about Installing Facebook Like Button in
Wordpress. However, need to know that this trick is only for wordpress.org
users (Self hosted), not for wordpress.com users (free wordpress).
To install Facebook Like Button in wordpress can be considered very easy,
as long as you are not too blind with HTML or PHP coding. The first thing
to think about is where you want to place your Facebook Like Button, under
posts, above posts, in homepage, or in the single posts.
The code of Facebook Like Button
If you're confused to find the code of Facebook Like Button, you can use
below code.
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php
the_permalink()
?>action=likelayout=standardshow_faces=truewidth=450font=arialcolorscheme=light"
allowTransparency="true" frameborder="0" scrolling="no" style="border:none;
overflow:hidden; width:450px; height:25px;"></iframe>
Overview of Wordpress Theme Structure
Need to know that the structure of blogger template is different from
wordpress theme structure. Perhaps, I can explain as follows. The Blogger
Template has one file in its structure, while Wordpress Theme is divided
into some files, but of course, all of the files are in a chained
relationship.
Generally, the file to manage the display of homepage is named index.php,
the single post named single.php, and the static pages named page.php, and
other files may exist. However, for premium themes, finds
different file naming. .
How to install Facebook Like Button in wordpress posts
For your basic knowledge, the code of wordpress post is like below:
<?php the_content(); ?>
But it may be different with your current theme, e.g. at default wordpress
theme, in its index.php includes the code below:
<?php the_content('Read the rest of this entry '); ?>
Here you can see that the basic code remains the same, only different at
"Read the rest of this entry ".
A default wordpress theme to illustrate
the way of installing Facebook Like Button. The Button is expected to
appear only at the end of post (single post). Tips: Practice this tutorial
on your probation blog to avoid any mistake and error during the
installation. But if you want to directly practice to your main blog, you
should backup your blog fully before editing.
Please login to your blog.
Go to Appearance => Editor.
On the right side, find the file of single.php then click it. Wait until
it loads perfectly.
Copy and then paste the code below, exactly above or below this code
<?php the_content('<p class="serif">Read the rest of this entry </p>'); ?>
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php
the_permalink()
?>action=likelayout=standardshow_faces=truewidth=450font=arialcolorscheme=light"
allowTransparency="true" frameborder="0" scrolling="no" style="border:none;
overflow:hidden; width:450px; height:25px;"></iframe>
Click Update File. Wait until the process completed.
Now open your blog, and then click the title of the post or on "Read
more".
Go to the end of post, and there, you should find your Facebook Like
Button.
Done.
The above is the example for single post. If you want the button on your
homepage, just include the code in the index.php file. For static pages,
just include the code in page.php file.
///////////////////////////////////////////
The best and most effective SEO Software
Posted: 29 Jul 2010 10:30 AM PDT
http://feedproxy.google.com/~r/BlogspotTutorial/~3/NSyBTSz_QbE/best-and-most-effective-seo-software.html?utm_source=feedburner&utm_medium=email
Talking about online bu