[Resolved] Number of comments

Home Forums Support Number of comments

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #115913
    Elio Martinez

    Hi,

    In masonry, the web shows the numer of comments in the first posts loaded, but when you click on “+more posts”, there is no number of comments in the next posts: nbamaniacs.com

    #115947
    Tom
    Lead Developer
    Lead Developer

    That is super weird – may have to do with the comment system you’re using.

    I’ll do some tests and will get back to you 🙂

    #116164
    Elio Martinez

    Tom,

    Now I am seeing another super weird thing. When I click in “more posts” in masonry, sometimes the links of every post is fine (url: web+category+post title) but sometimes not (url: web+post title) and then the clicked url dont exists.

    #116209
    Tom
    Lead Developer
    Lead Developer

    Any specific posts? I just went through 10+ pages and couldn’t find any missing the category name.

    #116213
    Tom
    Lead Developer
    Lead Developer

    For the comments, is it possible to temporarily disable your custom comment system and see if it keeps happening? You should only have to disable it for a minute. I just want to know if it’s a core WordPress issue, or if it has to do with the comments plugin.

    #116261
    Elio Martinez

    I will do that in a few hours, a lot of people is comenting now.

    #116320
    Elio Martinez

    I have deactivated Disqus, but when I do that every post is without comments because every comment is in Disqus.

    I have checked this option because the large amount of comments in my site:

    Disable automated comment importing
    If you have problems with WP-Cron taking too long, or have a large number of comments, you may wish to disable automated sync. Comments will only be imported to your local WordPress database if you do so manually.

    #116321
    Elio Martinez

    And now, when Disqus is activated again, our home shows 0 comments in every post in the comments link.

    #116322
    Tom
    Lead Developer
    Lead Developer

    I’m seeing the comments number on your homepage – seems to all still be there.

    It does look like Disqus using javascript to update the comment number on load – this would make sense that it’s not working with the ajax load more, because Disqus isn’t firing on each request.

    I’ll look into see if we can hook into the Disqus JS to update the comment number on each ajax load – will update you 🙂

    #116323
    Elio Martinez

    Great!

    #303131
    Elio Martinez

    Hi Tom,

    Two years later 🙂

    Something has changed in Disqus or on your code so this can work?

    #303243
    Tom
    Lead Developer
    Lead Developer

    Hmm, you could try this..

    <script>
    jQuery( document ).ready( function($) {
        $( '.load-more a' ).on( 'click', function() {
            setTimeout(function () {
                DISQUSWIDGETS.getCount({reset: true});
            }, 600);
        });
    });
    </script>

    No idea if it will work, but worth a shot.

    #303434
    Elio Martinez

    Where I have to put this? header.php?

    #303533
    Tom
    Lead Developer
    Lead Developer

    You can put it in the wp_footer hook in GP Hooks.

    #385300
    Elio Martinez

    Hi Tom,

    I tried this (put the code in wp_footer hook) but it is not working. Another idea?

Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.