Title: Using different comment system?
Last modified: August 20, 2016

---

# Using different comment system?

 *  [futurepocket](https://wordpress.org/support/users/futurepocket/)
 * (@futurepocket)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/)
 * I am currently using Disqus on my blog.. I wanted to know how I could configure
   this on a page to page basis.
 * I want my whole blog to use Disqus except for a group of pages to use the default
   WordPress comment system. Is this possible? Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [zimmi88](https://wordpress.org/support/users/zimmi88/)
 * (@zimmi88)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684771)
 * For Disqus particularly? Hmm… I don’t know if this is possible. I believe the
   Disqus plugin hooks in to the comments_template() template tag and overrides 
   WP’s default implementation with its own.
 * You could try coding something into your theme to use comment function calls 
   in the page.php template without calling comments_template()… might work, but
   I dunno. Something that says if within a set of page IDs use the custom solution,
   otherwise use comments_template().
 * I hope this helps!
 *  Thread Starter [futurepocket](https://wordpress.org/support/users/futurepocket/)
 * (@futurepocket)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684881)
 * Could you perhaps elaborate a little bit? How do I set the “custom solution” 
   to be WordPress’ default comment system?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684885)
 * Actually, it turns out to be really easy to do that.
 * The Disqus plugin works by adding a filter like so:
 *     ```
       add_filter('comments_template', 'dsq_comments_template');
       ```
   
 * So you hook into something before the `comments_template` like `the_content` 
   and remove that filter but only for a specific post or page ID (IDs are unique).
   So if you wanted to use Disqus for everything but disable it for page ID `123`
   it’s just
 *     ```
       add_filter( 'the_content' , 'mh_disable_disqus' );
       function mh_disable_disqus( $content ) {
          $id = get_the_ID();
          if( $id == 123 ) {
             remove_filter('comments_template', 'dsq_comments_template');
          }
          return $content;
       }
       ```
   
 * You can use other tests instead of the ID such as `has_tag( 'No Disqus' )` to
   handle Disqus commenting or not.
 *  Thread Starter [futurepocket](https://wordpress.org/support/users/futurepocket/)
 * (@futurepocket)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684890)
 * Do I just add that code into my functions? Don’t I have to call it in my page/
   post.php files?
 * “So you hook into something before the comments_template like the_content and
   remove that filter but only for a specific post or page ID (IDs are unique).”
 * Sorry, I’m more of a PHP noob, how would I hook into that?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684895)
 * > Sorry, I’m more of a PHP noob, how would I hook into that?
 * See that line that has `add_filter`? That hooks into [the WordPress loop](http://codex.wordpress.org/The_Loop)
   when the post or page content is being processed via `the_content` filter.
 * There are lots of places to do that hook, I just picked it because `the_content`
   get’s displayed before the `comment_template`. It’s a good place to remove any
   filters or functions that effect the comment section for that post or page.
 * You can put that code in your theme’s `functions.php` file or create it as a 
   plugin like so.
 * [http://pastebin.com/67raZpim](http://pastebin.com/67raZpim)
 * Copy that text into `wp-content/plugins/selectively-disable-disqus.php` and activate
   it in your dashboard.
 * Using it as a plugin is safer. If something goes wrong, just delete the plugin
   file.
 * You will need to know what the ID of the page or post that you want to exclude
   Disqus comments from is. It’s probably not `123`. 😉

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Using different comment system?’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/using-different-comment-system/#post-2684895)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
