Site logo

Archived topic

Number of comments

16 replies · Started by Elio Martinez on June 21, 2015

Viewing posts 1–15 of 17

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

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 :)

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.

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

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.

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

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.

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

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 :)

Great!

Hi Tom,

Two years later :)

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

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.

Where I have to put this? header.php?

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

Hi Tom,

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

This archived topic is closed to new replies.