-2

I have installed Disqus Comment System 2.74 in my Worpress version 3.5.2.
I want to disable disqus from all pages except Blog post.

Is there any way to do this?

closed as off-topic by kaiser Nov 10 '14 at 4:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

I downloaded the source and took a look, I see that Disqus hooks onto the comments_template filter so you can try this;

//hook onto comments_template filter with priority 1
add_filter( 'comments_template' , 'disable_disqus', 1 );

function disable_disqus($file) {

   //if not blog page, remove disqus filter
   if( !is_page('blog') ) {

      remove_filter('comments_template', 'dsq_comments_template');

   }
   //returns regular comments template
   return $file;
}
  • I didn't undersand where this code will be added??? – user2185117 Jul 4 '13 at 13:20
  • within your theme functions.php file – Adam Jul 5 '13 at 1:15
-2

just go to "Pages" and find the page you don't want disqus comments on. Then click on "edit" and look for the "discussion tab. Under "Discussion, simply uncheck "allow comments".

This is how it appears in my wordpress, using the optimizepress 2.0 theme + disqus.

  • There is no link to the plugin you mention and no one to the theme. Also you are, due to updates, pointing to a moving target. This answer will be useless for later visitors in the near future. – kaiser Nov 10 '14 at 4:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.