Support » Plugin: Facebook » [Plugin: Facebook] Comments showing on blog template page

  • Resolved Jared Atchison


    I am using the Genesis Framework for one of my sites, and on the Blog template page comments are acting weird.


    You’ll see that on the blog page that the Facebook plugin is injecting the comments after each posts, even though they should only show on the single posts. I don’t understand why they are showing on this page.

    I’ve tried all the different comment settings within the plugin and regardless of the setting this still happens.

    Any idea how I can prevent this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I never got a response to this, so I had to put a work around in place myself.

    Basically what’s happening is the Facebook plugin is auto-injecting itself to the_content – which is fine on single pages, but on a page that is a blog template you end up with all the comments showing up after each post in the loop – it’s a cluster.

    Ideally it would be nice to either 1) fix this 2) provide a function that can be called in the template to manually place the comments, alas since those are not options at the moment here is what I ended up doing.

    In my blog template file I placed:

    /** Remove Facebook from auto-injecting comments after each post */
    remove_action( 'init', 'fb_apply_filters',                40 );
    remove_filter( 'the_content', 'fb_comments_automatic',    30 );
    remove_filter( 'comments_array', 'fb_close_wp_comments'      );
    remove_filter( 'the_posts', 'fb_set_wp_comment_status'       );
    remove_action( 'wp_enqueue_scripts', 'fb_hide_wp_comments'   );
    remove_filter( 'comments_number', 'fb_get_comments_count'    );

    That fixed it.

    Hi @jaredatch,

    From all this code I´m using only this remove_action( 'init', 'fb_apply_filters' ); and applying like this

    But my problem now is I need to show the like button and figure it out this hack also affects the view of the like button in single post.

    Any idea how can I keep using this hacks and also show the like button?


    Hi @jaredatch,

    I found a way, just inserting this code <?php echo fb_like_button_automatic(''); ?> I can show the like button in the any position of the single.php.

    But seams the plugin options don´t work when the button is added in this way. And I really want to take out the option to add a comment when you like the post 😛

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Facebook] Comments showing on blog template page’ is closed to new replies.