Disqus, a remark platform, tends to exit and alter the feedback quantity hook for WordPress. This may occasionally find yourself inflicting your theme to indicate the textual content “View Feedback” as a substitute of the particular remark depend that you really want it to indicate. The explanation why Disqus tries to exchange the remark depend proven by WordPress is that will probably be out of sync with the precise remark depend on many events. So by having these substitute settings, your remark counts ought to match what they're in Disqus nevertheless eliminating this substitute settings will make your pages load quicker. Just lately, we had a chance to work on a consumer’s web site that had this situation ruining the styling of their feedback depend field. On this article, we'll present you methods to forestall Disqus from overriding your WordPress Remark Depend in themes.
After doing quite a lot of search over the web (together with the GetSatisfaction types for Disqus), we noticed that the majority locations on the internet advised that we go within the Superior Choices tab and activate this JavaScript possibility for remark counts which ought to repair the issue. You may get to the Disqus superior choices tab by going to Feedback » Disqus (look on the highest proper nook of the display screen). Check with the picture beneath:
This feature will output a JavaScript in your theme’s footer. So be sure that the footer.php file really has wp_footer(); operate in there. Most themes could have that in there, however sadly the one we have been working with didn't. So we had so as to add it in. This can clear up the problem. On each web page load the textual content “View Feedback” will present up then will probably be changed in a break up second with the precise remark depend. Nonetheless, in case you discover your web page load time would get slower.
After doing additional analysis, we ended up on Themehybrid Forums the place Adam Capriola advised an alternate. First you must open your theme’s features.php file and paste the next codes:
// Disqus: Stop from changing remark depend
remove_filter('comments_number', 'dsq_comments_text');
remove_filter('get_comments_number', 'dsq_comments_number');
remove_action('loop_end', 'dsq_loop_end');
Your remark depend could be off in case you do that. So it's best to go in your Discussions setting and disable Trackbacks. Additionally test the containers that claims commenters should be registered and so they will need to have a beforehand authorised remark.
That was fairly a little bit of trouble to be sure that we get the correct remark depend quantity in our WordPress themes.