Skip to content

Instantly share code, notes, and snippets.

@norico norico/close comments Secret

Created Jan 14, 2019
What would you like to do?
function wpc_comments_closed( $open, $post_id ) {
$post = get_post( $post_id );
if ('page' == $post->post_type) // uniquement sur les pages
$open = false;
return $open;
add_filter('comments_open', 'wpc_comments_closed', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.