function filter_media_comment_status( $open, $post_id ) { $post = get_post( $post_id ); if( $post->post_type == 'attachment' ) { return false; } return $open; } add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 );

privacy policy

We like to keep it clear and simple: Breaking New Business Ground does not collect or share personal information.