Help changing #respond to #disqus_thread

Posted in: Newsmag
Post count: 93

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.!

Post count: 6535

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..
Post count: 93

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:

View post on imgur.com

thank you!

Post count: 6535

Hi

I am glad I could help.
Thanks for your kind feedback and for your message.

Have a nice day!

Post count: 93

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.

Post count: 6535

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!

Post count: 93

Working well, you actually told me this on your first comment and i totally ignored it.
Thanks again!

Viewing 7 posts - 1 through 7 (of 7 total)
The forum ‘Newsmag’ is closed to new topics and replies.