Forums
Home / Plugin: Admin and Site Enhancements (ASE) / Remove comments
(@florin88)
2 weeks, 1 day ago
When comments are disabled, the page Comments still appears in the admin side menu. Shouldn’t this be hidden?
And the code to remove it is as simple as:
add_action(‘admin_menu’, function () {
remove_menu_page(‘edit-comments.php’);
});
(@qriouslad)
@florin88 Thanks for the suggestion and snippet. it’s possible that people want to disable commenting (stop accepting new comments), but still have access to old/existing comments via the Comments admin menu.
(@florin88)
2 weeks, 1 day ago
When comments are disabled, the page Comments still appears in the admin side menu. Shouldn’t this be hidden?
And the code to remove it is as simple as:
add_action(‘admin_menu’, function () {
remove_menu_page(‘edit-comments.php’);
});