add_action(\’admin_init\’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === \’edit-comments.php\’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(\’dashboard_recent_comments\’, \’dashboard\’, \’normal\’); // Disable support for comments and trackbacks in post types foreach (get_post_types() as $post_type) { if (post_type_supports($post_type, \’comments\’)) { remove_post_type_support($post_type, \’comments\’); remove_post_type_support($post_type, \’trackbacks\’); … Continue reading Completely Disable Comments
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed