Random, Tips, Web Design, Web Development, WordPress

How to hide Disqus from WordPress Pages

While working on a client’s blog this week we were presented with the issue of using Disqus for comments on their blog but they did not want it to appear when they made pages in WordPress.

After searching around on the Disqus site for a while we were not able to come up with a solution.

Luckily, someone else had run into this issue before and the WordPress Support forum pointed us in the right direction.

In the Disqus plugin, open up the file “disqus-comment-system/disqus.php”

Scroll down to the “Filters/Actions” section.

You should see code that looks like this:
{code type=codetype}if ( ! (is_single() || is_page() || $withcomments) ) { return; } if ( !dsq_can_replace() ) { return $value; }{/code}

{code type=codetype}if ( (‘closed’ == $post->comment_status) || (‘page’ == $post->post_type)){ return; }{/code}

If you have any issues feel free to contact Cat on the Couch Productions for all your WordPress Development needs.

Related posts

  • Madhu S

    Thanks for sharing the solution.Its a big issue.What is the reason behind this?

    • My theory is that Disqus still sees WordPress as a blogging tool and not
      the full CMS it is turning into. Hopefully they’ll add an option to the
      plugin in a coming version to turn on/off comments from pages.

  • My theory is that Disqus still sees WordPress as a blogging tool and not the full CMS it is turning into. Hopefully they’ll add an option to the plugin in a coming version to turn on/off comments from pages.

  • Thanks much for this information. It was very helpful for my blog and works great 🙂

  • It really hurted me a lot with time and energy while I migrated my
    comments to disqus. I think your help is really appreciated. Thanks for
    posting.

  • I think they will surely add the option in the plugin, so moderator can turn on/off the comments on the page.

  • Anonymous

    Great info, thanks! I hope WP makes this easier in future versions.

  • Wow this is a great post. This is very informative.

  • Thanks for sharing the idea there would be some apprehensions from segment i am up for it.

  • Really informative post. Never try to hide Disqus from wordpress. I will encoding it as soon. 

  • That was really interesting to know how to hide the Disqus from WordPress. U have made an amazing post here.Thank you !

  • Great tip! I’m gonna use this one for sure. Thanks!

  • Very informative post. Thanks for sharing information about hiding Disqus from a WordPress Website page.

  • nice post

  • Nice blog with post

  • Excellent post. I want to thank you for this informative read. Keep up
    your great work.

  •  Nice post. During last some days I am searching about this type of blog which helps me in my website designing and improve my knowledge in designing. And I have found this useful post.   

  • I like to read this good post. This post give a batter review to know about various types of arrangement of word press blog. This post sharing a easy and under stable suggesting. That’s good to well improvement of word press blog. 

  • MePlusBaby

    The problem now is that the default wordpress comment system is still showing up on my pages.  Any idea how to remove?  I don’t see that as a setting!

    • Try deleting “?php comments_template( ”, true ); ?” in page.php. See if that does the trick for you. The quotes are in your file. I had to change them to quotes so it would show in this comment.

      • MePlusBaby

        Thanks!

  • Try deleting in page.php. See if that does the trick for you.

  • Mario
  •  An amazing website social media tool used by over half a billion people across some of the largest sites on the web .Thanks for sharing the information how to hide Disqus from Word Press Pages.

  • Thanks for this information this is great for me specially.

  • Hi,

    Thanks for your tutorial. Any chance you would know how to just disable it from certain pages? I don’t mind it on the pages, I just don’t want it on the Contact page as there is a form there and people may confuse the two. Thanks!

  • Clark,

    I believe what you’re looking to do can be done by using
    this tutorial,
    http://buffernow.com/2012/08/disable-disqus-on-wordpress-page.

  • Had the same problem also and took me about 3 hours to find that too! whew. Too bad I should have read this before I started that troubleshoot. Anyway, thanks. Will keep this in mind.

  • smkypkserui

    Thanks its helpfull …

  • what about specific pages where the wordpress option to turn off comments “chooses” not to work. (I am having a problem with comments, on the rest of the pages where I turned comments off, it works, however, on 1 particular page, it won’t work.

    • Viz – What is the URL? Also, you’re saying turning off comments on specific pages isn’t working 100% of the time?

      • Yeah, I fixed it. I just deleted the page and made a duplicate. Ez does it.

        • Psalm1271dotcom

          This is what helped me. I just did this!

          Thanks sooo much!

  • shine

    greate

  • Interesting..

  • I love the disqus and I use it on all my blogs.

  • I have another way to Hide where you can directly disable disqus comments on individual wordpress pages.

    Here it is:

    > Go to in wordpress pages

    > then Click on any one page which you like to disable

    > then Click on ‘Screen Options’ at the top and enable the ‘Discussion’ option

    > at last, At the bottom of the page you will have a ‘Discussion’ window with
    an ‘Allow Comments’ option. Simply uncheck it and it’s done.

    • Great advice SugarCRM! Worked like a charm!
      +1.
      Can’t believe, Disqus didn’t put the option of disabling comments when creating a post.

      • William E

        It isn’t Disqus that is the problem. Enabling and disabling comments is a site-level decision set in WP.

    • Megan Antlfinger

      Thanks so much! Worked perfectly!

    • Video Gamez Network

      That worked perfectly, Thank You.. been searching all over the web.

  • Thanks its helpful …and very interesting post

  • why use it and then hide it? oh well maybe for the pages where you just don’t need the app right? thanks for these anyway. surely great help for the ones who found this page 🙂