Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* Set the default comment status for events to 'closed'.
* Could easily be adapted to target all post types or a different
* post type.
add_filter( 'get_default_comment_status', function( $status, $post_type ) {
if ( 'tribe_events' !== $post_type ) {
return $status;
return '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.