Reputation: 308
When editing a page or post in the admin area, you have the ability to enable and disable various screen options.
What I want to accomplish is to make it so that comments are not allowed by default, but can be turned on if the admin wants too. Currently by default it is set to allow comments.
How do I change allow comments
to false (un-checked) by default ?
Upvotes: 1
Views: 1251
Reputation: 146219
Just paste this in your functions.php
function comments_off_default( $post_content, $post ) {
$post->comment_status = 'closed';
return $post_content;
}
add_filter( 'default_content', 'comments_off_default', 10, 2 );
Also you can try this plugin.
Upvotes: 1