3

WordPress 4.3 brought more updates to the customizer. It also added a new option at the top admin menu bar that says 'Cusomize' and has a paintbrush. How can I disable this menu from showing up? We don't use the customizer, and I would not like our users clicking on it either.

We currently do $wp_admin_bar->remove_menu('comments'); but I do not know the term for the customizer. I tried both customize and customizer (guessing) but neither seemed to work.

11

customize should work. I was able to remove the Customize link with the following code:

add_action( 'wp_before_admin_bar_render', 'wpse200296_before_admin_bar_render' ); 

function wpse200296_before_admin_bar_render()
{
    global $wp_admin_bar;

    $wp_admin_bar->remove_menu('customize');
}
6

Or this more compact one will do the same :

add_action( 'admin_bar_menu', 'remove_some_nodes_from_admin_top_bar_menu', 999 );
function remove_some_nodes_from_admin_top_bar_menu( $wp_admin_bar ) {
    $wp_admin_bar->remove_menu( 'customize' );
}

Regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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