# Remove Built-In Block Style Options

> Removes block style choices you do not want editors to use, such as the outline button, rounded image or dotted separator, keeping the design consistent.

- Type: PHP
- Runs: Admin only
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: block-styles, editor, design
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/remove-core-block-styles/

## Code

```php
// Block name => style names to remove.
$wpide_removed_block_styles = array(
    'core/button'    => array( 'outline' ),
    'core/image'     => array( 'rounded' ),
    'core/separator' => array( 'dots', 'wide' ),
    'core/quote'     => array( 'plain' ),
);

add_action( 'enqueue_block_editor_assets', function () use ( $wpide_removed_block_styles ) {
    wp_add_inline_script(
        'wp-blocks',
        'wp.domReady(function(){(window._wpLoadBlockEditor||Promise.resolve()).then(function(){var map=' . wp_json_encode( $wpide_removed_block_styles ) . ';Object.keys(map).forEach(function(block){map[block].forEach(function(style){wp.blocks.unregisterBlockStyle(block,style);});});});});'
    );
} );
```

## Notes

Edit the list of block names and style names. Content that already uses a removed style keeps its look.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Built-In Block Style Options" 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/
