Integrating Facebook Comments Into WordPress

  • Post author:
  • Post category:WordPress

Always make a backup!

Before you being, remember to make a copy of any files you modify, especially theme template files. You never know if any changes you make can create issues or problems.


2. Modify the header.php Template

The first line of the plugin code can be directly inserted after the <body> tag in the header.php template.

Most WordPress themes allow you to insert code in the header without having to modify the header.php file.


3. Modify the comments.php Template

The second line of the plugin code can then be inserted where you want to locate the comments section. This will usually be in the comments.php template file.

To make sure that the comments appear correctly on every page of your website, remember to check if the static URL is replaced with the WordPress permalink.

If you want to place the Facebook comments before the WordPress comments, then insert the code right after the line saying <!– You can start editing here. –> in the comments.php template. If you want to place the Facebook comments after the WordPress comments, paste the code right after the </form> tag.

On the other hand, if you want to remove all of the WordPress comments and replace it with the Facebook comments, then simply change the call to your current comments.php template with the call to your Facebook comments.

With the official plugin, the integration of Facebook comments to your WordPress website becomes a simple matter of inserting the generated plugin code into the right place.

« Prev