Disqus header

Hide Disqus from pages in WordPress by Bas Wijdenes

Why would I want Disqus on pages in WordPress?

Since I started this blog I also installed the Disqus plugin. The Disqus plugin manages the comments for you with a big platform behind it to easily share comments and posts and it also holds out spam comments.

In this blog post I’m showing you how you can style the Disqus comment section in the twenty fifteen theme like mine.

Remove disqus pages
Remove disqus pages

Under every page or post you can manually choose if you’d like to have a
comment section plus ping-backs. You probably want a comment section on every blog post you have, but trackbacks and ping-backs are also very useful to know where your site is linked from. This way you could get in contact with more readers & bloggers. It could be someone linking to your contact page for a new project or help, that’s why you would want to use ping-backs on pages as well.


FIX: Remove disqus pages

The problem you’re having right now and that’s why you came to this post is because the Disqus comment section is showing up on pages you didn’t check ‘Allow comments’. The reason it shows up here is because your ping-backs are linking to that page. Disqus sees that as a comment and shows up on your pages (with no comments there..)

How do we remove the comment section on pages we don’t want them?

Disqus uses its own div: #disqus_thread.

Open the page you’d like to remove the comment section on and click on ‘text’. In the text editor you can write your own code. Add the following code to the top of your page:

<style>
#disqus_thread{
display: none !important;
}
</style>

It should look like this image:

Remove disqus pages
Remove disqus pages

If this didn’t work for you, could you please contact me or leave a comment behind.

PS: The ‘contact‘ in my last sentence works as a ping-back.

Published by

Bas Wijdenes

My name is Bas Wijdenes and I work full-time as a Services Engineer. In my spare time I write about the error messages that I encounter during my work. Furthermore, I am currently occupied with Office 365, Azure infrastructure, and PowerShell for automating daily tasks.

7 thoughts on “Hide Disqus from pages in WordPress by Bas Wijdenes”

      1. Add it like this:

        #disqus_thread{
        display: none !important;
        }

        That should do the trick. Doesn’t matter where you add it as long as it’s in your style.css

    1. Good one.
      In your theme is a file called style.css. If you add it here it will be applied to all pages / wordpress site.

      Why would you want that though? You could aswell disable the plugin then?

      1. Thanks Bas. I am learning more as I go. I did uninstall the plug in, and detached the site from Disqus on their page, but the embedded iframe still shows up. I will add this to the style.css, I just wanted to confirm before I did so. Thank you again! You rock!

Leave a Reply

Your email address will not be published. Required fields are marked *