How to add facebook comments Plugin in Wordpress
In this tutorial we will see together how to add a Facebook comments plugin on wordpress.
Create an ID application for your site
It is a necessary step for the creation of "facebook comments".
For that you must go to the link https://developers.facebook.com/apps/
Click on Add a platform
Choose Website
Type the URL of your Website
1-Installation "facebook comments" with a code
Now go to the comments module page while staying connected with your Facebook Developer account.
Generate the comments plugin code
Click Get Code |
Edit the comments.php file at the root of the wordpress Website
Now via FTP connect to the root of your website, choose the wp-content folder ---> themes ---> your website theme ---> the comments.php file
Right click on the comment.php file then View / Edit. Add the code:
After <section id = "comments-template"> and just before </ if (comments_open () || get_comments_number ()):>
In comments.php paste the code obtained
<div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/fr_FR/sdk.js#xfbml=1&version=v2.8&appId=187588705024244";fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script><div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="520" data-numposts="5"></div>
Replace http://www.facebook.com/id page fcb with <? php the_permalink (); ?>
In the header.php file add this code
<meta property = "fb: app_id" content = "{Your application ID number}" />
Save all
2-Installation "facebook comments" with a Plugin
Connect to your website and choose Extensions and install the extension Wpdevart Facebook comments
Type your Your application ID number and save
"facebook comments" plugin is well installed on your site
Merci
ReplyDelete