How to Add the Facebook Like Button on WordPress Single

I just added the FB-like button through an iframe on my blog.

Hey people. I just added the FB-like button through an iframe on my blog. As I am getting to many questions to handle about this right now I think I’ll just put the code here for you to copy and paste.

I am writing a really thorough post as I am writing this. It shall continue to be the sick and long, completely from 0-to pro kind of posts I have written so far.

But stay put with this for now.

This code:

  1. Should be put on a single.php or page.php
  2. You should NOT put it in a post
  3. It will grab the title of the post and put it on Facebook
  4. It shows only the Like button and nothing else

This code is not optimized for speed nor is it optimized for anything else than giving the opportunity for people to like your single pages and posts on a WordPress blog. I will video and post a better tutorial in a bit, but for those of you using WordPress, this is a good option to get out the boat right away.

Noticed that it didn’t work to copy and paste the below script. So I added it in a .rtf document and enclosed it here. Now it shall work better:

<iframe src=”<?php+the_permalink(); ?>&layout=button_count&show_faces=false&width=100&action=like&colorscheme=light” scrolling=”no” frameborder=”0″ allowTransparency=”true” style=”border:none; overflow:hidden; width:100px; height: 20px;”></iframe>

Have a lovely weekend.


Tags from the story
More from Jesper Åström

What you Must know about the Facebook Promotional Guidelines

Yesterday I wrote a piece which publicly showed a fraction of the...
Read More


Leave a Reply

Your email address will not be published. Required fields are marked *