Disable Disqus Comment System on Custom Post Type on WordPress

Have published some custom post type for contacts and other pages? Want to remove disqus comment system from there?

Then in this article I am going to make you guys learn that “How to disable disqus comment system on your custom post type on WordPress?” I know that most of you must be searching for this query in order to give the professional looks to your custom post types.

It really not looks good to have a comment system box on your professional pages like; contact, about, disclaimer, policy and others, therefore; you must disable disqus comment system in order to experience the professional look of your custom post type.

Disable Disqus Comment System

So, here are the steps listed which you guys need to apply in order to disable disqus comment system from your custom post type. However, remember that this trick will only work for the WordPress users. Now without taking your much time I would request you to go through the below steps;

Caution: Before applying these steps do take backup of your entire blog.

  • First of all, login to your WordPress account.
  • Then go to theme’s functions.php
  • Ones you are there, then simply add the following code there with some changes which are mentioned in below steps.

add_filter( ‘comments_template’ , ‘block_disqus’, 1 );
function block_disqus($file) {
if ( ‘custom_post_type_name‘ == get_post_type() )
remove_filter(‘comments_template’, ‘dsq_comments_template’);
return $file;
}

  • Now replace custom_post_type_name with your custom post type name e.g; “About Us“.
  • After that, Save the changes and ones you have done it then it will disable disqus comment system from your custom post types.
  • Repeat the same steps for each custom post type.

Conclusion
So, this was our guide for bloggers. I am sure that it would have been proven helpful for many of the users out there. If you have any kind of question or confusion left related to this article then do let me know. I shall get back to your queries as soon as possible and will try to resolve your all issues.

Was it helps, then don’t forget to share this article with your other friends and circle too, you may never know that your share may be proven helpful for many of the users out there. So, keep sharing and liking our stuffs over social media and keep spreading information.

Leave a Reply