Learn in this tutorial how to disable native block patterns in the WordPress editor using code.
WordPress 5.5 introduced many new features, including the option to use block patterns in the editor.
It also includes several native block patterns:
- Two buttons
- Three buttons
- Two columns of text
- Two columns of text with images
- Three columns of text with buttons
- Two contiguous images
- Large headrest
- Large header with a header and a button
- Large headline with a paragraph
- Header and paragraph
Most likely it will spread to more patterns over time.
So far so good, but if you take into account that in the next months there will be a lot of plugins and themes that add more patterns, that section can start to be complicated to manage, don’t you think?
So, if you don’t plan to use the native block patterns, it’s best to disable them so that they don’t appear
Snippet to remove native block patterns from the WordPress editor
Add the following fragment in functions.php:
It’s as simple as that. Now the “Core Block Patterns” in the pattern section.
In fact, if there is no other pattern, the section will not be displayed:
This code is not specific to Genesis, so you can use it for any WordPress theme.
The arrival of block patterns to the WordPress editor opens up many possibilities. And it’s easy for the new section to be filled with patterns from themes or plugins.
So if you (or your client) are not going to use the default patterns, now you know how to disable them. 😉
This is also especially interesting if you are creating your own theme or plugin and intend to add your own patterns.
Any questions? I read you in the comments.
And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉