Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Remove comments links from admin bar and admin menu
Title: Hide Comments Menu
Type: PHP > Custom Code
Location: Init
Priority: 10
// Remove comments from admin bar
add_action('wp_before_admin_bar_render', function () {
global $wp_admin_bar;
// Remove comments from admin menu
add_action('admin_menu', function () {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment