I told some people on Twitter that if I ever figured out how to do this, I’d write a post about it.
So when you install Disqus on your blog, everything is spectacular…until you look on your pages and see a big, glaring, yellow box with “Comments are closed on this post” (or whatever it says). It’s obnoxious, and it’s ugly, and no matter what you do, you can’t disable it.
Well, I hacked some PHP and found a solution.
- Go to the “disqus.php” file (in the plugins folder).
- Find this line in the file (CTRL+F):
if ( ! (is_single() || is_page() || $withcomments) ) { - Replace that line with this:
if ( ! (is_single()|| $withcomments) ) { - Save the file.
Voila. The annoying yellow box (and all Disqus content) is gone on all pages (because you deleted the || is_page() code). Of course, now I have the default WordPress “Comments on this entry are closed.” message there. But that’s far less annoying (in my opinion).
This leaves everything intact for posts, so you shouldn’t have any troubles there.
I don’t think this is a permanent solution. I think that Disqus is planning on addressing this issue in a future update. But for now, it gets the job done.
If you liked this, you might also enjoy...
Thanks for sharing this Lisa – Great Tip and a big time saver.
I have a few pages with 'Comments Closed' notification too, but never made time to address it.
Cheers
Thanks Lisa, I just applied your fix to my blog, http://www.corysstory.com and it worked like a charm. Connecting with you on Twitter now (@JaysonDeMers)…
Thanks Lisa, I just applied your fix to my blog, http://www.corysstory.com and it worked like a charm. Connecting with you on Twitter now (@JaysonDeMers)…
Disqus has been monitoring and making improvements in the way spam is recognized and reported. Last Monday, they made some significant changes to help remove undesirable content globally on Disqus.
Disqus now brings us the ability to comment using your Twitter account. You don’t have to give up your actual Twitter credentials since Disqus takes advantage of Twitter’s support..
Simply superb ! the best tool for comments and also for an back links no one can beat disqus system.