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?
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?
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;
}
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.