Support » Plugin: Disqus Comment System » [Plugin: Disqus Comment System] Disable on certain posts/post types?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you ever figure this out? I need to do the same thing.

    GOT IT!

    In Disqus version 2.74, open disqus.php and go to line 149. It currently has:

    $replace = get_option('disqus_replace');
    
        if ( is_feed() )                       { return false; }
        if ( 'draft' == $post->post_status )   { return false; }
        if ( !get_option('disqus_forum_url') ) { return false; }
        else if ( 'all' == $replace )          { return true; }

    Add the following new line before all of those “if” statements:

    if ( is_singular('product') ) { return false; }

    Save and re-upload the file and you can now leave reviews on products without disabling Disqus!

    Oops. My bad. That wasn’t the right code. That will show the reviews area, but will still prevent reviews from posting.

    So add the following line instead of what I previously said to add:
    if ( 'product' == get_post_type() ) { return false; }

    (Last post from me.)

    I documented this process more thoroughly: How to disable Disqus on WordPress custom post types

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Disqus Comment System] Disable on certain posts/post types?’ is closed to new replies.