WordPress Tutorials

How to Disable Disqus on Custom Post Types in WordPress

Founded by Daniel Ha and Jason Yan in 2007, Discus is a blog comment hosting that is wildly taken advantage in websites and online communities. Nowadays, Disqus has been featured on many major publications, including IGN, CNN and some others.

However, we find that some webmasters find that the comments on custom post types comments cannot be migrated properly, so they are eager to disable Disqus on custom post types in WordPress. In order to help webmasters deal with this issue easily and quickly, we will give a detailed explanation about this issue in below article.

It is true that there are some reasons that cause webmasters to disable Disqus on custom post types in WordPress. If Disqus does not show comments on custom post types of the host of webmasters, it is the error of the host. The host cannot use the normal sync feature to import comment to Disqus caused by the size of website.

In this way, an export file must be generated and sent by the host to pre-import the comments, which means that it only does this for posts rather than other post types. If Disqus shows no comment on a custom post type item that has more than 50 comments, it is proved that Disqus does not know there are comments.

In short, if the Disqus refuse to work and webmasters are going to disable Disqus on custom post types, the first thing that you need to do is to check the import settings.

On the other hand, if webmasters intend to disable Disqus on custom post types because of some additional reasons, please continue to read the following article.

Before doing any change, it is necessary for us to tell webmasters to guarantee that the syncing between and WordPress is enabling. Similarly, it reminds webmasters to make sure that they do a 100% WordPress backup when there is any change.

If everything has been prepared, webmasters need to add the code “functions.php “or a “site-specific plugin” in the theme. The function of the code is to add a filter, helping webmasters to disable the comment template display of Disqus and check a specific custom post type. By the way, webmasters need to take place of the custom-type-name with the current post type name.

Leave a Reply

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

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