Comments Evolved for WordPress
[resolved] Comment counts are incorrect... (20 posts)

  1. Chris M.
    Posted 2 years ago #

    I'm using Version 1.5.4 of Comments Evolved and I've noticed that the comment counts are not aggregated correctly on the main homepage and on individual blog posts. It seems to be pulling ONLY the number of Facebook and Google+ comments, not the native WordPress comment count along with them, but please investigate further.

    Website: ReflectOnThis.com

    Thanks for this awesome plugin! Hope this "bug" is resolved though...

    ~ Chris


  2. Chris M.
    Posted 2 years ago #

    For example, this post has 6 WordPress comments, 2 Facebook comments, and 2 Google+ comments, but the aggregated count on the homepage and post is only "4", which leads me to believe it is only calculating the Facebook and Google+ comments.

    Link to: Sample Post

  3. Brandon Holtsclaw
    Posted 2 years ago #

    I'll check into it now, I have another update planned for tonight anyhow to fix some of the shortcodes, but it definitely should be . infact here is the exact code used to make it ....

    function comments_evolved_get_total_count() {
      $total_count = 0;
      $wpc = comments_evolved_get_wordpress_count();
      $fbc = comments_evolved_get_facebook_count();
      $gpc = comments_evolved_get_gplus_count();
      $total_count = $total_count + $fbc + $gpc + $wpc;
      return $total_count;
    add_filter('get_comments_number', 'comments_evolved_get_total_count');
  4. Chris M.
    Posted 2 years ago #

    Thanks Brandon. You rock, as always...

    So I can just use this function in my functions.php until you push out an update?

  5. Brandon Holtsclaw
    Posted 2 years ago #

    yup if you like ... something like ...

    echo comments_evolved_get_total_count() . " comments";

    should do what your after

  6. Chris M.
    Posted 2 years ago #

    I'm sorry, but I tried to put that function in my functions.php and it crashed my site. Removed it, site is back.

    Also, where do I put that echo that you just shared here?

    Would appreciate the full, working code for functions.php. Thanks!

  7. Brandon Holtsclaw
    Posted 2 years ago #

    yea the function is already declared in the plugin ... so you just need to add the echo in your theme's file anywhere get_comments_number() is uesd ( like comments.php )

  8. Chris M.
    Posted 2 years ago #

    Oh, LOL... I see. So I shouldn't have put that in the functions.php then.

    Alright, so now I should find where the get_comments_number() is used in my theme and REPLACE it with this?

    echo comments_evolved_get_total_count() . " comments";

  9. Brandon Holtsclaw
    Posted 2 years ago #

    yup thats correct, but i think I may have a actually tracked down the root cause as well ( there is a second WP filter I need to be modifying ) so if you'd like I should be pushing an update with a fix within the hour

  10. Chris M.
    Posted 2 years ago #

    Yes. PLEASE. Prefer to have it "just work" (rather than modifying obscure code in my theme). I think having aggregated comments "out-of-the-box" is the way to go and it would make this plugin even more attractive! Loving it so far...

    Please let me know when that update is available, if you can...

  11. Brandon Holtsclaw
    Posted 2 years ago #

    yup, sure thing, I'll reply here and mark "resolved"

  12. Chris M.
    Posted 2 years ago #

    Looking forward to the update... Thanks again Brandon!

  13. Brandon Holtsclaw
    Posted 2 years ago #

    Chris 1.5.5 update is live now and should fix that up for ya, thanks!

  14. Chris M.
    Posted 2 years ago #

    Will check for it now! Hope this thread helped you improve things.
    Thanks again...

  15. Chris M.
    Posted 2 years ago #

    Looks like it works now! Comment counts are aggregated properly now!!! SO AWESOME man... I love it!

  16. Chris M.
    Posted 2 years ago #

    I see that you rolled back this fix in 1.5.6.

    For the record, I'm not sure I notice a difference in load time with 1.5.5, as some have reported.

    Any solution to the comments count on the near horizon?

  17. Chris M.
    Posted 2 years ago #

    Hey Brandon...

    Was wondering if you ever found a way to improve the load times from 1.5.5? Looking forward to an update.

  18. Brandon Holtsclaw
    Posted 2 years ago #

    Yea and its committed to the github repository as 1.5.7 ( i'll put a download link below for manual testing if you would like to try it ) but I have not released it yet officially because I want to add in some "work in progress" items that are semi related ... e.g. turring on and off individual comment counts and a completed implementation of the template tags and shortcodes.

    That said , 1.5.7 will likely never its self be released , the above work in progress items will be released as 1.5.8 or above ... so you can safely try 1.5.7 ( i'm running it on cloudhero.net for a week or so now ) and then when 1.5.8 is released it will just show as an update like normal.

    If this all seems greek to you then my best suggestion would be to just wait for the 1.5.8 release officially that i have tentatively penciled in to push out late this weekend as long as I have no huge road-bumps between here and there :)'

    https://github.com/bholtsclaw/comments-evolved ( for 1.5.7 unreleased testing )


  19. Chris M.
    Posted 2 years ago #

    Not Greek at all! :-) I really appreciate you taking the time to reply, and for making the iterations and improvements that you are.

    I will download and install 1.5.7 from Github now!

    Thanks again!

  20. Chris M.
    Posted 2 years ago #

    Heads up on version 1.5.7 from Github (not sure about any other version):

    I ran a plugin performance test with P3's Plugin Performance Profiler and I found that Gplus Comments took a whopping 62.95% of the cake. This seriously needs to be addressed (as I'm sure you can appreciate). Look at the comparison with other plugins on the same site in question...

    Plugin list:
    P3 (Plugin Performance Profiler) - 0.0152 sec - 0.87%
    Akismet - 0.1018 sec - 5.81%
    Digg Digg - 0.0911 sec - 5.20%
    Genesis Enews Extended - 0.0093 sec - 0.53%
    Genesis Simple Edits - 0.0093 sec - 0.53%
    Google Analytics For WordPress - 0.0157 sec - 0.90%
    Gplus Comments - 1.1033 sec - 62.95%
    OptimizePress - 0.1083 sec - 6.18%
    Polldaddy Polls & Ratings - 0.0408 sec - 2.33%
    Share a Draft - 0.0079 sec - 0.45%
    Simple Social Icons - 0.0037 sec - 0.21%
    Simple Urls - 0.0068 sec - 0.39%
    Subscribe To Comments - 0.0042 sec - 0.24%
    Wordfence Security - 0.0868 sec - 4.95%
    Wordpress Seo - 0.0676 sec - 3.86%
    Worker - 0.0806 sec - 4.60%

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Comments Evolved for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic