Do you want to increase the social sharing and comments of Posts? Then adding the facebook comment have great advantages because most of the people are already logged into their Facebook account through mobile or desktop.
Adding facebook comment is the really easy task and for that, you don’t need to install any plugin. So let’s get the start.
Here we have posted the simple few lines of code that will replace the WordPress comment area with the Facebook comment.
How To Add Facebook Comments in Genesis Theme
Add Comment Box
The first and most important thing is to add Facebook Comment Box on single post page. The below code will add comments box with the title of Submit a Comment.
Facebook Comment Moderator
Now lets to get to the point of moderator control. The first line of code that is where you put the Facebook ID (use this site to find your Facebook ID) of an admin who can moderate comments. The below code will add the meta tag in the head section that will contain your Facebook ID.
Or if you have multiple authors on your website and wanna let them control comments then you can create a Facebook app and specify your App ID in the document’s head. This will give the permission to multiple administrators for control the comments on your site.
Facebook Comment Moderator Code
Add Facebook SDK
Now we need to add Facebook’s Javascript SDK. If you are already using Facebook like button or share button then you don’t need to include it, because it already included with like, share button and page like of Facebook. So If you are not using any of Facebook thing then include the following code into your functions.php. In Genesis theme, we have to include SDK like the below.
Also, add the Facebook App ID where the javascript is connecting to facebook.
Facebook SDK Code
Displaying the comment count
Now after installing sometimes, we need to display how many comments have made in our post. And that WordPress only display its standard comments count and it won’t count the Facebook Comments. That’s why we have posted the code that will help you to display comments count. I recommend installing EA Share Count, which collects the share counts across multiple services, including Facebook Comments. Then use the following code to change the WordPress comment count to use the Facebook comments:
Facebook Comment Count Code
Full Code of Adding Facebook Comment
Below is the full code that’s we have separately discussed above. Remember, all the codes are going to put into your child theme’s functions.php.
Note: Don’t forget to add your Facebook App ID or else it won’t work.
That’s it guys. Hope it was helpful for you. Don’t forget to say at least thanks or if you have any error let us know.