• AardvarkGirl

    (@aardvarkgirl)


    I just realized that this has changed since version 3.5 to now 🙂

    Did search this question on the forums but got dated info.

    Is there a way to turn page comments OFF by default (VS creating pages and having to remember to turn it off) without ripping this out? <?php comments_template( '', true ); ?>

    😉

    Love yall! 🙂 (ok yes, I’m sucking up, hehe)

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator t-p

    (@t-p)

    Disallow comments on specific page:

    IN the Dashboard,

    – in the ‘screen option’ dropdown field, there are tickboxes to show the ‘discussion’ box for the page;
    – in the ‘discussion’ box below the page editor, you can then allow/disallow comments for the page.

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    Uh… thanks for the reply but, I did say I knew how to turn it off on a page by page basis. What I was asking was how to turn it OFF ON PAGES BY DEFAULT, not on a page by page basis.

    Hi there…
    Did you ever figure this out?
    I find it astounding that after so many years of people using hacks and so on for this simple “feature” it is still not included in WP… even at 3.1.x

    Would love to know how to do this… a plugin perhaps?

    Perhaps this will work?
    http://wordpress.org/extend/plugins/page-comments-off-please/

    It says only working up to 3.0.x but I’ll give it a try anyway…

    FYI: That plugin is working on my 3.1.2 site

    Thread Starter AardvarkGirl

    (@aardvarkgirl)

    I’d rather not use a plug-in. I’m just thinking that SOME WHERE in the code there is something that puts the check mark in the ‘allow comments’ box… the same some where to turn it off?

    I have just searched so many posts about this very issue, PLEASE can it be coded into WP – just a simple default “turn off comments on pages”?

    After all Wp is fast becoming a major CMS website design tool – we want efficiencies.

    – I totally support “inspiredminds comment 6 months ago “I find it astounding that after so many years of people using hacks and so on for this simple “feature” it is still not included in WP… even at 3.1.x”

    Working in hope!! Dennis

    Moderator t-p

    (@t-p)

    The folowing code should set pages and some custom post types to have commenting ‘off’ by default, while posts will still use the default option (i.e. commenting ‘on’).

    Place the code in your theme’s functions.php.

    function default_comments_off( $data ) {
        if( $data['post_type'] == 'page' && $data['post_status'] == 'auto-draft' ) {
            $data['comment_status'] = 0;
        } 
    
        return $data;
    }
    add_filter( 'wp_insert_post_data', 'default_comments_off' );

    Thanks TP,

    Thanks for the code, I’ll keep that.

    Not being a code expert, as far as I understand this means your then into a maintenance issue with Theme updates/changes, if your changing functions.php – (it can’t be loaded into a CHILD theme)?

    Hence, my request for a simple WP-Admin “Appearance” default control.

    Cheers Dennis

    WordPressThemeWithSlider

    (@wordpressthemewithslider)

    Thanks this helps so much!

    Thanks for this workaround T-P.

    And to reiterate what Dennis has said, we’d still like this most basic of features to be implemented in a future WP release.

    I will track down where to submit this feature request, as this discussion is obviously not the place for it.

    Cheers,

    Inspired

    Here is a link to this as a feature idea for WordPress. Please vote for it, by giving it a high star rating (5 stars, ideally)

    http://wordpress.org/extend/ideas/topic/option-to-turn-off-comments-on-new-pages-andor-posts-by-default?replies=1#post-20602

    Moderator t-p

    (@t-p)

    You are welcome!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Turn page comments off by default 3.1.1’ is closed to new replies.