I’m trying to install the Facebook “Comments Box” on my Church Child theme, right above my current WP comments. However, every online tutorial says that I must add FB’s code snippet in the “single.php” file, but I can’t find that file in the Child theme editor…I can only find it in the Genesis editor. However, when accessing the “single.php” (“Single Post”) Genesis file, I see a warning that says I should not edit this file. So how do I add this code snippet into my theme?? Thanks!
Please paste the code snippet on Pastebin and link to it from here. Thanks.
Have you tried the official Facebook plugin and dragged the Comments widget into an after post widget?
Thanks Brad! No, I haven’t used a plugin yet, because I often have problems with plugins after WP updates. I didn’t know that FB had their own plugin, so I’ll check it out.
It’s just the code snippet that you generate from here: https://developers.facebook.com/docs/reference/plugins/comments
And the Genesis warning says: “WARNING: This file is part of the core Genesis framework. DO NOT edit this file under any circumstances. Please do all modifications in the form of a child theme.”
…also, will this FB plugin replace my WP comments? I don’t want to lose the SEO from those comments.
There’s 3 code snippets you need to install.
The javavascript should be loaded using the wp_register_scripts and wp_enqueue_scripts functions.
The HTML for the comments box:
<div class="fb-comments" data-href="<a href="http://example.com&quot" rel="nofollow">http://example.com&quot</a>; data-width="470"></div>
A new after single posts widget or hook the script in directly using a custom function.
What theme are you using? Link to your site please.
You must be logged in to reply to this topic.
Are you a blogger, web designer, developer, or website owner looking to generate more income?
Promote products for the largest and fastest growing online website platform as part of our affiliate program.