- This topic has 16 replies, 2 voices, and was last updated 6 years ago by
Elio Martinez.
-
AuthorPosts
-
June 21, 2015 at 2:29 pm #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
June 21, 2015 at 11:03 pm #115947Tom
Lead DeveloperLead DeveloperThat 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 π
June 23, 2015 at 2:53 am #116164Elio 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.
June 23, 2015 at 8:42 am #116209Tom
Lead DeveloperLead DeveloperAny specific posts? I just went through 10+ pages and couldn’t find any missing the category name.
June 23, 2015 at 8:44 am #116213Tom
Lead DeveloperLead DeveloperFor 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.
June 23, 2015 at 12:46 pm #116261Elio Martinez
I will do that in a few hours, a lot of people is comenting now.
June 23, 2015 at 11:11 pm #116320Elio 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.June 23, 2015 at 11:13 pm #116321Elio Martinez
And now, when Disqus is activated again, our home shows 0 comments in every post in the comments link.
June 24, 2015 at 12:03 am #116322Tom
Lead DeveloperLead DeveloperI’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 π
June 24, 2015 at 12:04 am #116323Elio Martinez
Great!
April 7, 2017 at 2:40 pm #303131Elio Martinez
Hi Tom,
Two years later π
Something has changed in Disqus or on your code so this can work?
April 7, 2017 at 7:27 pm #303243Tom
Lead DeveloperLead DeveloperHmm, 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.
April 8, 2017 at 10:59 am #303434Elio Martinez
Where I have to put this? header.php?
April 8, 2017 at 6:18 pm #303533Tom
Lead DeveloperLead DeveloperYou can put it in the wp_footer hook in GP Hooks.
September 14, 2017 at 6:49 am #385300Elio Martinez
Hi Tom,
I tried this (put the code in wp_footer hook) but it is not working. Another idea?
-
AuthorPosts
- You must be logged in to reply to this topic.