How to add facebook comments to a page

Hey. Is there a way to show the facebook comments add-on on specific pages?

Hi Peter,

Thank you for reaching out to us. If Facebook comments is active, the default WP commenting system will be replaced, so you can show Facebook comments on specific pages only if you use default page template and enable the comments on the page. For the other pages you can disable the comments.

To learn more please see https://codex.wordpress.org/Comments_in_WordPress

Hope this helps!

I receive that, thank you.

This is what I’m figuring out -

I created 3 landing pages, no container, no header, no footer, to lead people to for a product launch. I would like to include facebook comments on those specific pages yet do not generally use comments throughout the site.

These are not default pages. How can I implement this within the launch?

Hello Peter,

That is possible with some customization. Please check this guide. First make sure that on page Settings > Discussion: Allow comments is set to ON. Then try adding this custom code on your child theme, functions.php file:


function add_fb_comments() {
if(is_page(5) || is_page(6) || is_page(7) ) { /*Change 5/6/7 to correct page ID of your page*/
    x_get_view( 'global', '_comments-template' ); 
}
}

add_action( 'x_after_the_content_end', 'add_fb_comments', 10 );

This will enable comments at the end of the current page content. More customization from here is unfortunately outside the scope of our support. Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.