• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

How to add a Facebook Like Button to WordPress

October 30, 2015 by admin 1 Comment

How to add a Facebook Like Button to WordPressFacebook is a powerful tool for any blogger or site owner. Today’s snack is a Tutorial that shows you how to add a Facebook Like button to your WordPress site in 3 easy steps to help your readers easily share your content.

Step 1:

From within your WordPress Admin Dashboard, Open the Appearance Editor.

Step 2:

From within the Appearance Editor, choose the theme file that you want to add the Facebook Like button to. For example, if you would like to add the Facebook Like button to every post, open the Single.php file.

Step 3:

Add this code below to the place within that theme file that you want your Facebook Like button located.

<iframe src="http://www.facebook.com/plugins/like.php?href='. urlencode(get_permalink($post->ID))
.'&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:21px;" allowTransparency="true"></iframe>

That’s it, now you have added a Facebook Like Button to your WordPress site.

Click here to find out How to display a Facebook Share button in WordPress using a shortcode. Or you can click here to find out How to display the number of your Facebook fans.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Featured, WordPress Tutorials Tagged With: Facebook, Sharing, Social Media

Reader Interactions

Comments

  1. noman322 says

    August 7, 2012 at 2:29 pm

    Facebook is my fav app http://goo.gl/2bhVI

    Reply

Leave a Reply Cancel reply

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

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com