How to Add Facebook Like Button in WordPress

Like Tweet Pin it Share Share Email

Do you wish to add a Fb Like button in WordPress? Fb is the biggest social media platform on the planet. Utilizing Fb Like button, you may permit customers to Like and share your content material on Fb. On this article, we’ll present you add the Fb Like button in WordPress.

Facebook Like Button for WordPress

Methodology 1: Manually Add Fb Like Button in WordPress

This technique requires you so as to add the code instantly in WordPress. If haven’t finished it earlier than, then please check out our newbie’s information to pasting snippets from the net into WordPress.

First, it’s good to go to the Like button web page on Fb builders web site and scroll all the way down to ‘Like Button Configurator’ part.

Like button settings

Use the configuration to decide on the Like button format and dimension. You will notice a preview of the Like button beneath.

You’ll be able to depart the URL subject empty, as we’ll dynamically fill within the URL in WordPress.

As soon as you might be glad with the preview, click on on the ‘Get Code’ button.

This can carry up a popup displaying you two items of code snippets beneath the JavaScript SDK tab.

Facebook Like button code generator

Copy the primary code snippet and add it to your WordPress theme’s header.php file proper after the <physique> tag.

Subsequent, it’s good to copy the second piece of code and paste it in your WordPress theme’s template recordsdata the place you wish to truly show the Like button.

Likely it would be best to add it to single.php, archive.php, web page.php, and so on. Nevertheless, in case your WordPress theme makes use of content material templates, then you will want so as to add it to content material templates.

Please word that when you instantly add these code snippets to your WordPress theme, then they are going to be overwritten if you replace the theme.

You’ll be able to keep away from this, by creating a toddler theme after which including these code snippets into your baby theme templates.

Methodology 2: Add Fb Like Button in WordPress Utilizing a Plugin

On this technique, we will likely be utilizing a WordPress plugin so as to add Fb Like button. This technique is way simpler and is advisable for novices.

Very first thing it’s good to do is set up and activate the WP Like Button plugin. For extra particulars, see our step-by-step information on set up a WordPress plugin.

Upon activation, the plugin will add a brand new menu merchandise labeled WP Like Button to your WordPress admin bar. Clicking on it’s going to take you to plugin’s settings web page.

WP Like Button settings

First it’s good to choose the place you wish to show the Like button and select whether or not you need the button to be cell responsive or not.

Subsequent, it’s good to present a Fb App ID or an Admin ID of a consumer who has entry to Fb insights. You need to use your individual Fb username or ID right here.

Beneath the default picture setting, you may add a picture that will likely be used when a put up or web page doesn’t have a Fb thumbnail. Depart this feature, we’ll present you set Fb thumbnail later on this article.

Beneath ‘What to love’ choice, it’s good to choose ‘Every web page/put up may have its personal like button’. After that it’s good to choose a format, alignment, language, in your Fb button.

On the backside of the web page, it is possible for you to to see a preview of how the button will seem in your web site.

As soon as you might be completed, click on on the ‘Save Settings’ button to retailer your modifications.

That’s all, now you can go to your WordPress web site and you will notice the Like button for every put up.

Like button in WordPress

What’s Open Graph Meta Information? Learn how to Add it in WordPress

Open Graph meta information helps Fb acquire meta details about a web page or put up in your WordPress web site. This information features a thumbnail picture, put up/web page title, description and creator.

Fb is sort of sensible in pulling up the title and outline fields. Nevertheless, in case your put up has a couple of picture, then typically it reveals incorrect thumbnail when your article is shared.

In case you are already utilizing Yoast search engine optimization plugin, then this may be simply fastened by visiting search engine optimization » Social web page and clicking on the Fb tab.

Facebook Open Graph

For extra particulars and alternate methods so as to add open graph meta information, see our information on add Fb Open Graph meta information in WordPress.

That’s all, we hope this text helped you learn to add Fb Like button in WordPress. You may additionally wish to see our listing of 10 finest Fb suggestions and tutorials for WordPress customers.

In case you appreciated this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You can too discover us on Twitter and Fb.

Comments (0)

Leave a Reply

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