Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disqus Comment Count Always 0 Comments

I think I've set up Disqus as instructed for universal code.

Trouble is that it always says that a post has 0 comments.

Take this post: http://tx0rx0.com/retropie-and-the-raspberry-pi/

which discus says has 11 comments, and then compare to the front page

http://tx0rx0.com

I thought all you needed was a link to the page with the disqus comments with #disqus_thread appended to it. Like so:

<a href="tx0rx0.com/retropie-and-the-raspberry-pi#disqus_thread>Comments</a>

and the javascript with correct shortname would do the rest. Where did I go wrong? Also, why is there a period there?

like image 801
cii Avatar asked Dec 16 '22 06:12

cii


1 Answers

The protocol and presence of trailing slashes matter when it comes to comment count lookups. Try this:

<a href="http://tx0rx0.com/retropie-and-the-raspberry-pi/#disqus_thread">Comments</a>

You might also consider using a 'disqus_identifier' and 'disqus_url' with the commenting embed, which you can then use in the comment count link like this:

<a href="http://tx0rx0.com/retropie-and-the-raspberry-pi/#disqus_thread" data-disqus-identifier="some_identifier_for_thread">Comments</a>

This will normalize the data between what is passed to us, and what you're expecting when you render the comment count links.

like image 106
Ryan V Avatar answered Jan 01 '23 23:01

Ryan V