Easiest Facebook Comments Without Plugin WordPress Mod
Want to add Facebook Comments to WordPress but don’t want to use a plugin? Just add these two code snippets and it’s a done deal.
This mod also works with Simple:Press the WordPress forum plugin.
Plugins are a quick easy way to add Facebook comments to WordPress but some add extra bloat to your site. That added bloat eats up system resources slowing your blog down.
It’s easy to save those resources by adding Facebook Comments manually by adding two small snippets of code to your theme.
Before you start head over to Facebook Developers site and create your app. Be sure when adding your sites url it is proper. http / https and using www if that’s how your WordPress site is set up.
All that’s necessary is adding the below code snippets in two of your theme files.
We suggest downloading your original theme files for safe keeping just in case a placement error takes your site offline. Yes it does happen – been there done that!
Copy this snippet into your header.php file immediately after the <body> opening statement. Be sure to add your Facebook App ID!
Add this snippet in your single.php theme file. Preferably just before WordPress comments are called, to use both functionalities. This can also be added to page.php to add functionality to your blogs static pages.
This snippet is optionally for adding Facebook Comments to Simple:Press Forum. If you share Simple:Press forum posts to Facebook i suggest utilizing this modification to encourage engagement with your Facebook visitors.
The ability to moderate your Facebook comments is also easy. It’s required to add your FB App ID to the sites header in a meta tag. If your running Yoast SEO click the social > Facebook tab. You’ll see a place to paste your app id. That’s the easy way.
Have questions? Comment below 😉