admin管理员组

文章数量:1290103

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

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

Take this post: /

which discus says has 11 ments, and then pare to the front page

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

<a href="tx0rx0/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?

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

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

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

which discus says has 11 ments, and then pare to the front page

http://tx0rx0.

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

<a href="tx0rx0./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?

Share Improve this question asked Sep 3, 2013 at 1:38 ciicii 1532 silver badges13 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

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

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

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

<a href="http://tx0rx0./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 ment count links.

本文标签: javascriptDisqus Comment Count Always 0 CommentsStack Overflow