HostGator Web Hosting

How To Embed Facebook Comment Plugin On Your Blog

Have you ever thought of how interesting it can be for your site when a reader comments to your without keying in their names, email addresses in the comment box? Well today I will be taking you through on how to embed Facebook comment plugin on blog. This feature allows your readers to leave comments below your post by using their Facebook accounts instead of using the actual comment box.

But it is also important to use common comment box since you can use plugins like Jetpack to filter and block spam comments. If you look on blog I am using both the common comment box and the Facebook comment plugin so as to give my readers the best easier commenting option. I will be monitoring to know the most methods my readers use is the one I will leave for their commenting purposes.

To start setting up your Facebook commenting plugin, you need to visit Facebook’s Developers Page. When you are on the page will see the Comment Plugin Code Generator, where you will be required to enter the URL of the site you want to place the comment plugin. For this instance I will use my site as seen in the image below. After entering your site’s URL, besides the URL there is width box that you can use to set how the comment plugin will look and the space it can take, for you sake, leave it blank for now till you understand the width you will want.

There is also the maximum number of comments you want your readers to leave, set it to 20 or 10 or the number you want.

After you have finished setting how the plugin should appear on your pages, click the Get Code button. You will be provided with two code snippets as shown in this image. Copy the first snippet and paste it before the tag.

But in some instances, there are other themes which are difficult to find the tag. What you can do is go to your WordPress dashboard then go Widgets, choose the Custom HTML widget, drag and drop it to other widgets on Header, paste your first copied code snippet in the widget the click save.

Go back to the developers page again and copy the second snippet code.

Since the second snippet code is the code for the plugin, you have to place it where people can easily see it for them to leave a comment on your blog. The ideal place to place it is below single post, so as the reader can see it after finishing reading your content.

Themes like DuperMag and SuperMag are easy to place the code below single post because they allow you to place a widget below single post. But to themes like this NewsToday is so hard to place the code below single post. You will need to place the code directly to the parent theme, my next tutorial will be teaching you on how to make a child theme from the parent theme, so as you can’t temper with the parent theme while editing it.

To edit a theme like NewsToday so as to enter the plugin, go to your WordPress dashboard>>Appearance>>Editor>>NewsToday theme. After you’ve chosen your theme as NewToday to edit, you will be provided with Theme Files. Scroll down and click Single Post.

At single post, you will be provided with code structure of you theme on single post, scroll down while checking till you reach this code ending

<!–.single_post — . Place your second copied code snippet from developer just after this code <!–.single_post–

Click Update File to save your edited single post files.

After doing all the above, your plugin is now ready. Readers can start commenting using the plugin.

HostGator Web Hosting

Leave a Reply