Support » Plugin: Disqus Comment System » Comment count always 0 on homepage

  • I have been scouring the internet trying to find a solution to this, but to no avail; none of worked for me.

    The comment count for a disqus thread is never correct on the homepage – it always says “Leave a comment” even if there are multiple comments. Anyone have any idea how to fix this? I’ve found a few solutions on the internet involving editing content.php and disqus.php, but none have worked for me.

Viewing 1 replies (of 1 total)
  • The solution that I figured out few minutes ago and worked for me (SEO purpose):

    	$loc = "<YOUR_USER_ID_HERE>&api_key=<YOUR_API_KEY>";
    	$json = file_get_contents($loc);
    	$json_array = (array)(json_decode($json));
    	$comments_number = $json_array['response']->numPosts;

    And in my templete I used <?php echo $comments_number; ?>.

    I used Disqus Plugin for WordPress (checked the JavaScript files in footer) and added the shortname as is.

    Worked for me!

Viewing 1 replies (of 1 total)
  • The topic ‘Comment count always 0 on homepage’ is closed to new replies.