The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] Comment count above bubble remains the same on all pages
How-to and Troubleshooting
(@wiwimaster)
Active Member
Joined: 5 years ago
Hi,
on all our pages we have the comment count of 8, regardless of whether there are actually 0 or 200 commens on a page. An example can be found here: https://www.backenmachtgluecklich.de/rezepte/protein-waffeln.html
How can I enable those counts to be in-sync with the actual comment count?
thanks a lot
Jan
(@asti)
Illustrious Member
Joined: 8 years ago
Hi@wiwimaster,
This could be a cache issue. Please delete your website caches and press CTRL+F5 (twice) on the frontend.
(@wiwimaster)
Joined: 5 years ago
Active Member
Posts: 12
Jun 18, 2020 9:18 am
Hi @asti
I cleaned all WP Rocket caches & Cloudflare caches and reloaded the page with a complete reload. However, the count "8" remains on all pages the same.
What else could this cause?
thanks
Jan
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Jun 18, 2020 11:44 am
@wiwimaster,
We'll need to admin login details again. Could you please send it again?
(@wiwimaster)
Joined: 5 years ago
Active Member
Posts: 12
Jun 18, 2020 11:46 am
@asti Yes - I've sent them to you.
thanks for looking into this
Jan
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Jun 18, 2020 12:05 pm
@wiwimaster,
We'll check and back to you asap.
(@asti)
Illustrious Member
Joined: 8 years ago
(@wiwimaster)
Joined: 5 years ago
Active Member
Posts: 12
Jun 18, 2020 1:15 pm
@asti Thanks. I've enabled the plugin editor, you can go ahead.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Jun 19, 2020 8:02 am
@wiwimaster,
The issue comes from the "BMG zuletzt aktualisiere Beiträge" widget you're using. It messes the post id, thus it always displayed the same comment count.
wpDiscuz uses the WordPress native (core) get_comments_number() function and as far as the widget changes the post object it messes the $post_id parameter in the function. Please contact the widget developers and let them know about the issue. They'll better know how to fix the issue.
More info about the function you can find here: https://developer.wordpress.org/reference/functions/get_comments_number/
(@wiwimaster)
Joined: 5 years ago
Active Member
Posts: 12
Jun 19, 2020 8:13 am
@asti
thanks, that's interesting to see. I'll reach out to them, thanks a lot for investing the time to dig up that issue.
Best
Jan
(@wiwimaster)
Joined: 5 years ago
Active Member
Posts: 12
Jun 24, 2020 10:31 am
@asti quick update on this topic - adding a simple wp_reset_postdata(); at the end of the interfering widget solved this problem, and the comment count is now displayed properly.
thanks again for the world-class support!!
Best
Jan
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8192
Jun 24, 2020 10:54 am
Thank you @wiwimaster,
We really appreciate you, taking time and share the information.