# Turn Off the Starter Patterns Window for New Pages

> Stops the "Choose a pattern" window from popping up every time someone creates a new page. Users can switch it back on in the editor preferences.

- Type: PHP
- Runs: Admin only
- Category: [Block Editor](https://wpide.com/library/category/gutenberg/)
- Tags: patterns, editor, preferences
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/turn-off-starter-patterns-modal/

## Code

```php
add_action( 'enqueue_block_editor_assets', function () {
    wp_add_inline_script(
        'wp-preferences',
        'wp.domReady(function(){(window._wpLoadBlockEditor||Promise.resolve()).then(function(){wp.data.dispatch("core/preferences").setDefaults("core",{enableChoosePatternModal:false});});});'
    );
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Turn Off the Starter Patterns Window for New Pages" 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/
