# Disable Additional CSS

> Removes the Additional CSS panel from the Customizer and the custom CSS option in the Site Editor, so styles are only changed in code.

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

## Code

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

    return $caps;
}, 10, 2 );
```

## Notes

CSS that was already saved keeps loading on the site.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Disable Additional CSS" 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/
