- This topic has 4 replies, 2 voices, and was last updated 10 years, 3 months ago by .
- The forum ‘General Discussion’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
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!
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="http://example.com" 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.
© 2023 WPEngine, Inc.