If your WordPress website does not use comments, then there is no reason to use comment forms and have Comments link WordPress admin panel.
Let's make WordPress admin panel minimal - remove both comments and admin menu link without any additional plugins.
To disable comments via WordPress admin panel, go to Settings >> Discussion, and uncheck these two checkboxes:
Allow link notifications from other blogs (pingbacks and trackbacks) on new posts
Allow people to submit comments on new posts
Now half of the work is done. In theory, WordPress will not show let visitors leave comments. But still, spammers find ways to utilize these comment forms, so it's better to disable them entirely.
Go to Appearance >> Theme File Editor, or Tools >> Theme File Editor, and add this code to the end of functions.php file:
// Close comments on the front-end
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);
// Hide existing comments
add_filter('comments_array', '__return_empty_array', 10, 2);Now, to completely remove Comments link and other Comments functionality in WordPress or WooCommerce, add this code to the same functions.php file:
// Disable comments everywhere
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_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');
}
}
});
// Remove comments page in menu
add_action('admin_menu', function () {
remove_menu_page('edit-comments.php');
});
// Remove comments icon from admin bar
add_action('init', function () {
if (is_admin_bar_showing()) {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
});Once you Save changes, you will no longer see Comments in WordPress admin menu, and comments will be completely disabled in your WordPress website.
I help businesses clean up slow, plugin-heavy setups and turn them into fast, reliable websites that are easier to manage and perform better. From custom development and workflow improvements to checkout optimisation and performance boosts — you get changes that save time and help your site earn more.