Recent Updates

Select Your Topic

Select Your Topic

“Not Old, Gold” Archives

“Not Old, Gold” Archives

Find Things

Search for:

Fixing View Comments in Disqus Plugin

I’ve made no secret of the fact I love the Disqus commenting system plugin. However each time I upgrade it I have to go through the same rigmarole of changing the plugin due to one specific problem. So this will explain how I fix the View Comments problem in the Disqus plugin for WordPress.

Update #1: This is fixed to show how to do it in WordPress 3.1 and the current version of Disqus 2.61

The Problem

On my Blog page the comment count works fine, as you can see in this picture:

The 44 text is displaying perfectly on the Blog, category and archive pages. However on the single post page by default instead of the comment count it says View Comments and is cut off, as you can see below.

So to fix this (or at least change it to the way I prefer, as some people may prefer it saying View Comments), inside the wp-content/plugins/disqus-comment-system folder you need to edit the disqus.php file. For those not comfortable doing this, make a backup or you can always re-install a new copy of the plugin if things go wrong. On line 697 you will see this section of code:

So once done, my single post page now looks correct, displaying the number of comments:

There, looks lovely again. This isn’t really a bug as it’s designed to say View Comments there, however in the default WordPress comment system this would show the number of comments here, so we are simply re-creating that functionality.

292 thoughts on “Fixing View Comments in Disqus Plugin”

Thank you so much! As it seems, this actually solved the problem. I thought this feature only was for dealing with the Disqus comment count – which was working fine – and not the WP/Thesis comment count.

I think this is among the most vital info for me. And i am glad reading your article. But want to remark on few general things, The website style is perfect, the articles is really excellent. : D. Good job, cheers
By the way: why do you choose livefyre for commenting?

I think this is one of the most important info for me. And i’m glad reading your article. But should remark on some general things, The website style is wonderful, the articles is really excellent.http://www.mysuperdietary.info/

That is a great level to bring up. I supply the ideas above as common inspiration however clearly there are questions just like the one you carry up where an important factor will likely be working in trustworthy good faith.

I loved this system to add comments. is a great option for those who wish to manage commentson websites. My site is http://marketmultinivel.com/amway You can add this system on my site? I await contact.

This is a great tutorial but if I may add respectfully the original code is on line 732 in Disqus 2.66 Also, how do you add text after the number count that appears on the frontend of your site? Can you add text after the number of comments?

After research just a few of the blog posts in your web site now, and I actually like your manner of blogging. I bookmarked it to my bookmark website checklist and will likely be checking back soon. Pls try my site as effectively and let me know what you think.
Your home is valueble for me. Thanks!…
This web site can be a walk-by means of for all the data you needed about this and didn’t know who to ask. Glimpse here, and you’ll positively uncover it.
There may be noticeably a bundle to find out about this. I assume you made certain nice factors in features also.

There are actually plenty of details like that to take into consideration. That is a great level to bring up. I supply the ideas above as common inspiration however clearly there are questions just like the one you carry up where an important factor will likely be working in trustworthy good faith. I don?t know if finest practices have emerged around things like that, but I’m certain that your job is clearly identified as a good game. Both boys and girls really feel the affect of only a moment’s pleasure, for the remainder of their lives.
A formidable share, I just given this onto a colleague who was doing a bit evaluation on this. And he in actual fact purchased me breakfast because I discovered it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading extra on this topic. If doable, as you become expertise, would you mind updating your weblog with extra details? It is extremely useful for me. Big thumb up for this blog submit!

Aw, this was a really nice post. In concept I wish to put in writing like this additionally – taking time and precise effort to make a very good article… but what can I say… I procrastinate alot and certainly not seem to get one thing done.
I’m impressed, I need to say. Actually rarely do I encounter a weblog that’s each educative and entertaining, and let me tell you, you have got hit the nail on the head. Your thought is excellent; the problem is something that not sufficient individuals are speaking intelligently about. I’m very happy that I stumbled throughout this in my seek for something regarding this.

Hello Joel, I would like to thank you for providing this helpful post, it worked for me. The only thing is, what code should I substitute if I want to show the text too? Right now, it only says ‘1’ where I would like it to say ‘1 Comment’ or ‘2 Comments.’ Any ideas?

Hmm, I see where you’re coming from, but I didn’t change any of the default settings. Using your method, my posts only showed the number, I’m interested in showing both the number and text. I thought it had something to do with the calls you used, but I wasn’t sure. Really, I’m just trying to get it to work on my WordPress theme because originally all it said was View Comments where the indicator (on the homepage) went.

It is check feature to put the JavaScript in footer. There is brief delay and disqus would kick in and insert the number itself. It was the page scroll down to comments when use of click to view comment.

I also had the same issue and I soted it out with the help of this article. But I have another problem that, I wan the page scroll down to comments when use click in ‘View comment’ or ‘Number of comments’ link.

This is the perfect solution! It changes “View Comments” into the exact same counter you have on your homepage (In my case, that’s “# Comments and # Reactions”) You’re a genius sir!
Joel, do you think you could update your blog post to include this alternative solution as well? By highlighting it in your popular blog post (it was the first thing I found when googling) you could really help a ton of people. Thanks Joel, and thanks for writing this blog post in the first place to help us all!

Can you explain me how can i replace the “0” in the counter? I don’t get it, i readed your comments, but i don’t understand it. I’m from poland and it didn’t work on my blog : http://www.hajducek.pl. Can you explain me it from step to step?

So it now does show the comment number when the page has fully loaded? If so with the javascript loading in the footer it will always load last before it takes over the default WordPress comment wording. I do this on my own site but it loads quickly for me so I don’t really notice this issue.

When the page is fully loaded, the comment number shows up, but I need to
have the javascript in the footer (because of my theme or whatever the
comment count doesn’t load when it’s in the header).

There is a brief delay and it’s not a huge deal, but before it would show
the comment count before disqus would kick in and insert the number itself.

Have you updated the plugin recently? I don’t understand why it’s showing
“0 comments” when comment_text is used now. If there was a way to just
disable disqus from replacing the text that would be even better to be
honest. I already use the comments_number function and that’s what gets
replaced… I would rather disqus not replace it at all. I’ll look into
that I guess…

It sounds like you either misplaced some of the code, restore from your backup and then try again (but remember to keep an original backup). Else they do update their plugin quite often so the code may have changed but it shouldn’t give that error. Also try typing it in rather than copying and pasting as I don’t know what software you’re using to edit but some of the special character (single quotes etc) may not be transferring correctly. Sorry about that!

Thanks for your fast reply. I’m still getting the error message. I’m using Notepad++. The thing is that I get the message even after restoring the backup, which is quite strange. I’ve just uninstalled the plugin and installed it again without problems, but I still can’t get rid of the ‘View comments’ text -and by the way, the link doesn’t work either 🙁

That should be fine in Notepad++. It’s possible your theme might be using some other way to pull in the comment count, but it looks like a StudiPress theme so I doubt that is causing any problem.
If the error was there after restoring from the backup it suggests something else. So I would make a copy of the disqus.php and then try again with the changes, checking you don’t change anything else. Then see if that works, if not you have the backup.
I see on your site that the View Comments changes to the number of comments and the link goes down to your comments fine now?

you can see the number of comments shifted dramatically to the right of the comment bubble.This only happens with certain WordPress themes which are written differently than they’re supposed to. To fix this, you will have to go into your theme’s code and remove the code which shows the comment count at the bottom of the post.

OK, I think I get what they’re trying to do (which is mark a certain area of the html as replaceable by JS with the proper comment count later). However, the fact that the “View Comments” text link is not configurable is just shocking, at this level of supposed maturity of DISQUS.

I’ll try pinging them about this thread, as what the plugin does is ridiculous.

This only happens with certain WordPress themes which are written differently than they're supposed to. To fix this, you will have to go into your theme's code and remove the code which shows the comment count at the bottom of the post….

Welcome to Flash Games, the online games resource website. Free arcade games Play on 4000 games,Nice Video and counting . The best of online games is on http://www.ongamesite.com.We have fun playing some of the best online games ever created and remember to check back often because we are always adding new games.

We supply electronic products with good quality and low price.Especially our Laptop Battery have a long life.we sell many kinds of branded merchandise.such as apple Laptop Battery /ibm Laptop Battery…… Please contact us to know details.I'm sorry if i bothered you.I hope you can forgive me.

Thank you so much! As it seems, this actually solved the problem. I thought this feature only was for dealing with the Disqus comment count – which was working fine – and not the WP/Thesis comment count.

Brian – also try this: http://help.disqus.com/entries/102528-wordpress… the section on Comment Count on permalinks – if you go to Disqus in WordPress (under Comments) and then top right click Advanced Options, the option is there. Just fixed the same problem for another client.

Strange, as I've used it in Thesis a lot and it has always been fine for me. Also the answer doesn't make much sense because at the top is the correct text but incorrect count and at the bottom is the correct count.You could try removing that info from the byline and then using the Thesis Openhook plugin adding in <?php comments_number('0 KOMMENTARER', '1 KOMMENTARER', '% KOMMENTARER'); ?> somewhere and seeing if that displays the correct count. If so you can then position and style it the way you like.

Thanks for your quick reply Joel.Yes they're correct, I just translated the “comments” into Swedish, {num} is still there.

I contacted Disqus and they told me the following (which I don't really get):On your page, at the top of all the posts it says “(x) KOMMENTARER AND (x) REAKTIONER” – which is the correct text. But at the bottom it will say “1 KOMMENTARER” which is the incorrect count. This only happens with certain WordPress themes which are written differently than they're supposed to. To fix this, you will have to go into your theme's code and remove the code which shows the comment count at the bottom of the post.

I haven't seen that problem before Brian. I have changed some settings in Disqus too but I know it works fine in Thesis as I do use it for quite a few of my clients.If you go into your Disqus settings, click Customize on the left and then the Appearance tab, under Comment Count link you should have a {num} (or {num} comments) in for Multiple Comments. Are those boxes set up correctly?

Thanks for the reply Joel. I was able to narrow it down with the help of a friend and added some CSS that fixed it. Thanks for looking. I would have replied back but I was working on another display problem. 🙂

Interesting Rich, I had a look in Chrome and IE8 and it looks like it's displaying fine for me. The number of comments is just to the right of the bubble, or it says View Comments on the single post page. That's how it's supposed to be isn't it, just next to the bubble like the date is next to the clock and the author name next to the other icon?Is it a different browser you can see the problem on?

I was wondering if you have ever seen a problem like I'm having on http://www.newwaveclassics.fm? If you look at the main page and the individual posts, you can see the number of comments shifted dramatically to the right of the comment bubble. I found your blog by searching on span.dsq-postid because that appears to hold the key to my display problem.

If I turn off Disqus it displays perfectly. There is something about the Disqus plugin that is adding additional padding and I have not been able to find the answer.