Hello,
My question is how to add FB comments to specific pages and post types? I followed this thread and provided solution but it does not work and results in site errors.
Global comments allowed is enabled.
Thank you for your time.
Hello,
My question is how to add FB comments to specific pages and post types? I followed this thread and provided solution but it does not work and results in site errors.
Global comments allowed is enabled.
Thank you for your time.
Hey @z1z1z1,
Thanks fo writing in!
Did you install Facebook Comments extension? You can check it here: https://theme.co/apex/forum/t/extension-facebook-comments/83
And then you use this code in your child theme’s functions.php file:
function add_fb_comments() {
if(is_page(123) || is_page(456) ) {
/*Change 123/456 to correct page ID of your page*/
x_get_view( 'global', '_comments-template' );
}
}
add_action( 'x_after_the_content_end', 'add_fb_comments', 10 );
To get the correct page ID, please check this out:
Thank you,
Yes FB comments extension has been installed. Is there shortcode for the FB comments? Would like to add to widget.
Hey @z1z1z1,
There is no shortcode for the FB comments that come with X. The comment area is displayed through a template file _comments-template.php that is in wp-content/themes/x/framework/views/global
.
Hope this helps.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.