According to Tyler Hayes’ response here (http://stackoverflow.com/a/11253997), we understand that the Disqus plugin will hook onto WordPress comment functions to display updated comment counts without waiting for the actual comments to sync back to the local WordPress database to update the local database counts. In our tests, this wasn’t always reliable, sometimes showing the latest count but sometimes not. However, at least it sometimes works.
Our question is, is there any other way of displaying the comment count without relying on the
For example, the default TwentyEleven theme uses:
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>
We have a custom theme that made extensive use of:
<?php comments_number('0', '1', '%'); ?>
However, this function won’t work with the Disqus plugin.
Are there any other methods for displaying Disqus comment counts that will only show the number of comments, without an appended “Comments” and without the comments being wrapped inside a link? This would make it easier to manipulate and work into our design.
We understand we can continue using the
comments_number()function and just wait for comments to sync from Disqus back to our local WordPress database but syncing is not instantaneous and could potentially take a long time (we get hundreds of comments a day, our site gets ~1.4m visits a month). For example, even on our staging environment, the syncing of comments can take anywhere between 6 minutes and 45 minutes (in our observations) from after they are posted until they appear in the local database.
Moreover, our current live environment isn’t syncing, but we’ve found this post (http://wordpress.org/support/topic/plugin-disqus-comment-system-auto-syncing-not-working) and have asked our system admin to look into it. This is likely an issue on our end.
Still, we really need a more flexible way of calling or displaying the latest comment counts for each post on our home and archive pages. Are there any solutions to be had? Our search on the Disqus website yielded nothing and Google search results all reference older comment count issues with older versions of Disqus (we’re using 2012).
Thanks for your help.
- The topic ‘[Plugin: disqus] Showing Disqus comment counts without the comments_popup_link function?’ is closed to new replies.