DISQUS

The Disqus Blog: (WordPress) Showing number of comments on front page and on each post

  • Jared Evans · 1 year ago
    Thanks!

    I put <?php wp_footer(); ?> after <?php get_footer(); ?> and before the <body> in each of:

    index.php
    page.php
    single.php

    works now!
  • Daniel Ha · 1 year ago
    Hi Jared,

    Take a look here: http://disqus.com/faq/#faq-17

    Thanks
  • Julian · 1 year ago
    I have <?php wp_footer(); ?> in my footer.php as the FAQ says, but on the pages showing a single post, I still don't get any indication of how many comments there are. It works on the index-page.

    My website is julianmoeller.dk.
  • Julian · 1 year ago
    Well, I fixed it myself.

    In disqus.php, I changed dsqs_wp_footer to not check if it was a single post.
    That made the comment-count show up on single posts as well.
  • Daniel Ha · 1 year ago
    Hi Julian, glad to hear that.
  • Joe Arnold · 1 year ago
    Thanks! That fixed the problem for me.

    My theme already had the appropriate calls in it to satisfy the advice at http://disqus.com/faq/#faq-17
  • Jase · 1 year ago
    Fixed my problem.. Cheers!
  • essay · 1 year ago
    i too fixed my problem...
    thanks a lot daniel..
    regards,
    Essay
  • mogmachine · 1 year ago
    doesn't work for me as this solution os referencing 1.4, ..and i am using the latest, ....this is driving me crazy, ..i have tried using both:
    <?php comments_popup_link('0', '1', '%'); ?>
    and
    <?php comments_number('zero', 'one', 'more'); ?>
    but i cannot get the number to show on singles, or my front page, ..except for the very first article !!

    Any help would be greatly apreciated

    www.thecommentfactory.com
  • bnason · 5 months ago
    OMG, Beautiful find. I had this problem with the Thesis theme, which is an otherwise AWESOME theme.

    Here's what I changed, specifically, to get comment counts to work on my single post pages:

    1) Go to your PLUGIN folder in Wordpress; then to the DISQUS plugin folder.
    2) Find the disqus.php file -- open it in your text editor of choice (I recommend Notepad++)
    3) Look for this section of code around line 272:

    function dsq_comment_count() { ...
    } else if ( (is_single() || is_page() || $withcomments || is_feed()) ) {

    Change the second line to:
    } else if ( (is_page() || $withcomments || is_feed()) ) {

    4) Upload the disqus.php file back on to your server!

    If your WP isn't showing comment numbers on the single post pages from Disqus -- this should work!

    Basically -- just delete out the (is_single() part of it entirely.

    Dunno' what this does but it seems to work!
  • moserw · 5 months ago
    Well I've tried everything listed on this page and then some more, but it just does not work. I just cannot get the correct number of comments to display on the home page. It always shows 0. My blog is www.nela.in. Please help...