diff --git a/functions.php b/functions.php index aa5125c..56290cb 100644 --- a/functions.php +++ b/functions.php @@ -284,4 +284,14 @@ function hale_main_nav_fallback($args) { } return; } + +function disable_comments_media_attachments( $open, $post_id ){ + $post = get_post_type( $post_id ); + if( $post == 'attachment' ) { + $open = false; + } + return $open; +} +add_filter('comments_open', 'disable_comments_media_attachments', 10 , 2); + ?> \ No newline at end of file