On archives pages for custom post types there’s a link to the comments with a counter.
I use disqus and i don’t sync comments to wordpress database because we have hundred of thousands of them. So all the counters show 0.
I’ve read here https://help.disqus.com/customer/portal/articles/565624-adding-comment-count-links-to-your-home-page
That in order to display disqus comment count i need to append #disqus_thread to the end of the url.
Newsmag appends #respond.
What i need to know is what file to modify in order to switch #reposnd to #disqus_thread
thank you.!
Hi
Try to modify the get_comments() function from td_module_single_base.php like here: http://screencast.com/t/fuejuPw3nA This should work for posts.
$buffy .= '<a href="' . get_permalink($this->post->ID) . '#disqus_thread"><i class="td-icon-comments"></i>';
For pages try the same modification in td_module.php.
Hope this help.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Andrei you are a legend, solving all my weird problems. The fix worked i see disqus counter now.
Is there a way to apply a similar fix to archives? see pic:
thank you!
Andrei, sorry to disturb once again! Your fix works for single post, i was wondering if a similar fix could be done for archives pages, see picture attache don my previous post, the grey box counters.
Hi
The archive pages uses the get_comments() function from td_module.php so try to add the above line of code here: http://screencast.com/t/rm9633TSbQlD it should work fine.
Thanks!
Working well, you actually told me this on your first comment and i totally ignored it.
Thanks again!