- This topic has 16 replies, 2 voices, and was last updated 6 years, 7 months ago by Elio Martinez.
-
AuthorPosts
-
June 21, 2015 at 2:29 pm #115913Elio 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 #115947TomLead 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 MartinezTom,
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 #116209TomLead 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 #116213TomLead 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 MartinezI will do that in a few hours, a lot of people is comenting now.
June 23, 2015 at 11:11 pm #116320Elio MartinezI 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 MartinezAnd 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 #116322TomLead 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 MartinezGreat!
April 7, 2017 at 2:40 pm #303131Elio MartinezHi Tom,
Two years later π
Something has changed in Disqus or on your code so this can work?
April 7, 2017 at 7:27 pm #303243TomLead 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 MartinezWhere I have to put this? header.php?
April 8, 2017 at 6:18 pm #303533TomLead DeveloperLead DeveloperYou can put it in the wp_footer hook in GP Hooks.
September 14, 2017 at 6:49 am #385300Elio MartinezHi 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.