remove_menu_page,remove_submenu_page full (ok)

How to hide the menu item created by the theme in WordPress admin panel?

function custom_menu_page_removing() {
    remove_menu_page( $menu_slug );
}
add_action( 'admin_menu', 'your-MENU' );

Ví dụ: $menu_slug is woovina-panel

add_action( 'admin_init', 'wpse_136058_debug_admin_menu' );
function wpse_136058_debug_admin_menu() {
  remove_menu_page('woovina-panel' );
}

Đôi khi người ta chọn slug kiển truyền tham số ta có thê rời menu như sau?

Last updated

Was this helpful?