# Disable the Customizer

> Removes the Customizer for every user, including its admin menu and admin bar links, on sites that are configured elsewhere.

- Type: PHP
- Runs: Run everywhere
- Category: [Disable Features](https://wpide.com/library/category/disable-features/)
- Tags: disable, customizer, admin
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/disable-customizer/

## Code

```php
add_filter( 'map_meta_cap', function ( $caps, $cap ) {
    if ( 'customize' === $cap ) {
        $caps[] = 'do_not_allow';
    }

    return $caps;
}, 10, 2 );

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

## Notes

Classic themes that keep their logo, colors or menus in the Customizer lose access to those settings.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable the Customizer" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
