WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
[resolved] comment count not showing up for FB comments (6 posts)

  1. VertoX7
    Member
    Posted 2 years ago #

    This is a very minor problem but would be cool to get it fixed. The FB comments ARE showing up on my posts but at the top where it shows how many comments are on that post it does not count the FB comments. This is the same for my normal theme and my mobile theme.

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    This is intentional. The comment count is only updated to reflect the FB comments on the pages where the comments are actually loaded and shown.

    This is for speed reasons. Having to load the FB comments on pages where the post and comment count is shown, but the comments themselves are not shown, turned out to be really friggin' slow.

    Furthermore, the comment count will only get updated if you're using the get_comments_number() or comments_number() function calls. If your theme directly references the $post->comment_count variable, then the plugin can't update that.

  3. vanMeerdervoort
    Member
    Posted 2 years ago #

    Still could you tell us how this theoretically could be done? It sorta looks silly if the post says 0 comments while the viewer also sees 10 comments below the post.

    I'd like to try and find a workaround.

    Hope you can help :)

    Cheers
    Vincent

  4. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    If your theme is using the "comments_number()" function to show the number of comments, then you'll get the correct count back.

    Look at your theme's code, where it displays the number of comments. See how it's doing it.

  5. ryanerickson
    Member
    Posted 2 years ago #

    Tech Ninja Otto- I bow down to you but still have a question regarding this. I use the Atahualpa theme and can't seem to find any instance of the "comments_number()" function (site: http://1790.us). I also delve into their forums for answers but couldn't find any.

    Is there a way to show comment count for FB based comments without the "comments_number()" function?

    Thanks in advance!

    ~Ryan

  6. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    Is there a way to show comment count for FB based comments without the "comments_number()" function?

    No. If your theme isn't using the comments_number() function, then you need to edit the theme to use that function.

    Furthermore, Atahualpa is using the comments_number function and will show the correct number. Look in the comments.php file:

    http://themes.svn.wordpress.org/atahualpa/3.7.1/comments.php

    <h3 id="comments"><?php // Comment Area Title
    	comments_number(__('No comments yet to ', 'atahualpa'),
        __('1 comment to ', 'atahualpa'), __('% comments to ', 'atahualpa'));
    	echo get_the_title(); ?></h3>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic