How to Disable Displaying Disqus Plugin On Custom Post Types

Have you ever wanted to disable displaying Disqus plugin on certain custom post types? well if yes, then follow us to teach you how you can disable disqus comment section on predefined post types.

Disqus a really good comment plugin for wordpress that has a lot of good features, it’s very easy to install, and it displays the comment form automatically. but in most cases users don’t want the disqus to display, example of such cases are :

  • Shop section of the blog (you want to show normal comment form as review section)
  • Have different comment form for some post types
  • Display Disqus on blog articles but display normal comment form in Pages

if you are having a similar problem, here is how to solve it:

First you need to know on which post types you want to disable displaying disqus, below are some examples:

  1. post
  2. page
  3. product
  4. attachment
  5. review
  6. any other post type

Second, after you know the post type, all you have to do is insert this code inside your Functions.php file in your theme folder :

as you see in the above code, you can add more post types if you want, in the code above, we removed disqus from “product” post type, after this disqus won’t display for product post types, just add any number of post types in this line, for example :

We hope this article was helpful for you to disable Disqus on certain custom post types in WordPress.

please share your experience with this issue in the comments section below.

1 Star2 Stars3 Stars4 Stars5 Stars (14 votes, average: 5.00 out of 5)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments

Pin It on Pinterest

Share This
Would love your thoughts, please comment.x
FreeAmazing WordPressSubscription

FreeAmazing WordPressSubscription

Join our mailing list to receive the latest news and updates about wordpress themes and plugins. we don't spam, we only send unique weekly emails about wordpress.

You have Successfully Subscribed!