WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to hide customize menu and another submenu on wordpress?

I already hide some submenu on wordpress like

function hiden() {
    remove_submenu_page( 'themes.php', 'widgets.php' );//widget
    remove_submenu_page( 'themes.php', 'theme-editor.php' ); //editor
    remove_submenu_page( 'themes.php', 'theme_options' );} //theme-option
add_action('admin_head', 'hiden');

but if I want to remove customize menu remove_submenu_page( 'themes.php', 'customize.php' )... but It can't... Anybody can help me, whats wrong ??? Thank you

share|improve this question
up vote 1 down vote accepted

If you deal with wp menus you shoudl use admin_menu filter.

add_filter('admin_menu', 'admin_menu_filter',500);
function admin_menu_filter(){
    remove_submenu_page( 'themes.php', 'widgets.php' );//widget
    remove_submenu_page( 'themes.php', 'theme-editor.php'); //editor
    remove_submenu_page( 'themes.php', 'theme_options' ); //theme-option
add_action('admin_print_styles-themes.php', 'hide_customize');
function hide_customize(){
    echo '<style>#customize-current-theme-link{display:none;}</style>';

you can place it to your plugin or functions.php in your theme.

share|improve this answer
its same can not work for hide customize... function admin_menu_filter(){ remove_submenu_page( 'themes.php', 'customize.php'); } add_filter('admin_menu', 'admin_menu_filter',500); – Juan Lie Nov 14 '12 at 10:58
if you want just "hide" but not to remove page, you can use a updated sample. – qwerty qwerty Nov 14 '12 at 13:14
great idea @code monkey. Thanks so much... But anyway, I wanna be know... how to disable customize option because if just hiden, user can fill customize.php in url ??? – Juan Lie Nov 15 '12 at 15:27
if you will remove capability 'edit_theme_options' of user roles of your user wouldn't be able to user customization url. but even edit theme options... – qwerty qwerty Nov 15 '12 at 15:30

The correct page url of customize.php is customize.php?return=%2Fwordpress%2Fwp-admin%2Fnav-menus.php

So to remove the submenu use:

remove_submenu_page( 'themes.php', 'customize.php?return=%2Fwordpress%2Fwp-admin%2Fnav-menus.php' ); // hide the customize submenu
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.