[resolved] Comments integration (17 posts)

  1. Seth Long
    Posted 3 years ago #

    The comments feature doesn't appear to properly position the comments and form (at least with my theme). With FB comments OFF, my comments appear below my author bio box (right where my theme wants them). With Facebook plugin 1.0 and FB comments turned ON, they appear directly below the body of my post but above the author bio box, which is not where my theme calls for comments.

    Worse, the theme's comment system then reports "no comments yet" where the comments are supposed to appear.

    Theme is Canvas 5.0.1 from WooThemes.


  2. JesseHeap
    Posted 3 years ago #

    Yeah it appears they are adding the comments using the_content tag which isn't ideal:

    add_filter( 'the_content', 'fb_comments_automatic', 30 );

    Ideally they'd use a filter/action that allows more control over positioning of the comments as it doesn't work well on my blog either.

  3. fcswebsites
    Posted 3 years ago #

    I'm integrating this plugin with a client site that uses the Thesis theme and i'm having the same problem.

    The current filter doesn't allow any positioning - a shortcode or being able to choose a location to hook to would be ideal :)

    Will keep reading up and post back if I find a solution.


  4. midwestkel
    Posted 3 years ago #

    +1 for not adding to posts automatically. Give me a function that I can add to my theme please.

  5. fredgorski
    Posted 3 years ago #

    The whole integration of this plugin is weird... Take my case. I have a facebook page, and the plugin posts to it. But whenever I receive I comment in a facebook post, it doesn't appear to my page timeline. Neither does it to wpcomments tab. So, to find out a comment was posted, I need to go checking every single post. I like the automatic integration, but FB is dull... Another issue is, whenever someone like your post on fb, the correspondant box on WP keeps showing no likes to the posts...

  6. JesseHeap
    Posted 3 years ago #

    As an ugly workaround I commented out the following in fb-social-plugins.php:

    /*add_filter( 'the_content', 'fb_comments_automatic', 30 );
    		add_filter( 'comments_array', 'fb_close_wp_comments' );
    		add_filter( 'the_posts', 'fb_set_wp_comment_status' );
    		add_action( 'wp_enqueue_scripts', 'fb_hide_wp_comments' );
    		add_filter( 'comments_number', 'fb_get_comments_count' );*/

    and I added a call in my theme as shown below which allows more control of placement of the comments box:

    if (function_exists('fb_comments_automatic')) {
       $fb = fb_comments_automatic($fb);
       echo  $fb;
  7. Matt Kelly (Facebook)
    Plugin Contributor

    Posted 3 years ago #

    We're aggregating comments feedback at http://wordpress.org/support/topic/plugin-facebook-comments-suggestions?replies=69 so that we can focus on it in the next major version.

    Do you mind posting this there? Thanks

  8. Atif Siddiqui
    Posted 3 years ago #

    sorry for me being a noob here. I just wanted to know how can I disable the default wordpress comments after successfully installing facebook comments.

    my site: http://www.itsallabouttech.com

    please help.


  9. Matt Kelly (Facebook)
    Plugin Contributor

    Posted 3 years ago #

  10. Atif Siddiqui
    Posted 3 years ago #

    @Matt Kelly

    I've replied there.

  11. getitfromboydotnet
    Posted 3 years ago #


    do you have any idea on how to hack the manual placement of the LIKE and SEND button placing it right after the blog post title rather than the present's case of it being placed at the beginning of the blog post content if one chose TOP. thanks

  12. JesseHeap
    Posted 3 years ago #


    I haven't looked at the code of this plugin to see where you'd have to hack.

    In my case I actually had a similar need as well, and what I did was just manually drop the code from facebook (https://developers.facebook.com/docs/reference/plugins/like/) into the proper theme file (single post.php in my case) so that it shows up right after the title. You can see the result here:


    So basically I don't use the facebook like feature from this current plugin.

  13. getitfromboydotnet
    Posted 3 years ago #


    Thanks a lot! great workaround. I didn't think of that simple solution.:D

  14. Elmo Allen
    Posted 3 years ago #

    @JesseHeap, you don't have to comment out anything to remove a filter. Just use remove_filter('the_content', 'fb_comments_automatic'); etc. as a not-as-ugly workaround.

  15. Elmo Allen
    Posted 3 years ago #

    Sorry, actually you have to first remove the action adding those filters with remove_action( 'init', 'fb_apply_filters' );

    That removes all the automatic code added to the posts and pages. If you want to put some back, you'll have to copy-paste the code from fb-social-plugins.php adding them, e.g.

    if ( array_key_exists( 'send', $options ) && array_key_exists( 'enabled', $options['send'] ) && $options['send']['enabled'] ) {
    add_filter( 'the_content', 'fb_send_button_automatic', 30 );
  16. nhlabor@gmail.com
    Posted 3 years ago #

    This post says resolved but I cannot figure out how to make my Comments apear after the author Bio.

    I cannot find the places to insert the code from above if that is what I need to do.

  17. nickd32
    Posted 2 years ago #

    @elmo5 - I found a cleaner way that only affects the FB comments (and doesn't disturb the other elements... like buttons, etc.)

    First, from the Codex...

    It is also worth noting that you may need to prioritise the removal of the filter to a hook that occurs after the filter is added. You cannot successfully remove the filter before it has been added.

    The trick is to add a new action hook that occurs after init -- so I just chose wp_head, but there is a list of other action hooks you could use.

    Here is my code.

    add_action( 'wp_head', 'fix_fb_comment_placement' );
    function fix_fb_comment_placement() {
    	remove_filter('the_content', 'fb_comments_automatic', 30);

    Then, in your comments.php file (or wherever you want the comments to show up, include this line of code:
    <?php echo fb_comments_automatic(''); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.