Eliminating or hiding unnecessary blocks in the content editor can streamline your block menu. This also enhances your focus by allowing you to quickly locate the blocks you actually need.
Many of our writers have turned off unnecessary blocks in their Gutenberg editor to maintain a clean and user-friendly interface.
Since implementing this change, they have experienced a significant increase in both productivity and concentration while writing.
In this article, we will provide you with step-by-step instructions on how to remove a block in WordPress.
Reasons to Remove, Hide, or Delete a Block in WordPress
If you run a WordPress blog, you’ll be using the Gutenberg editor to create posts and pages for your website. In this editor, you may come across some blocks in the menu that you will likely never utilize.
For example, the content editor includes a Verse block that is designed for inserting poetry or song lyrics. However, if your blog focuses on food or fashion, this core block is entirely irrelevant to your content.
In such cases, you can simply remove these blocks from the post editor to achieve a cleaner and more focused interface.
If you prefer not to remove a block and its functionality, you can simply hide it using WordPress’s built-in block visibility feature. This allows you to keep the block accessible for future use without completely deleting it.
If you’ve made an error in your post or wish to eliminate certain content, you don’t need to remove or hide a block. Instead, you can directly delete the specific block that contains the content you want to remove.
This action will remove the content associated with that block while leaving the block itself intact in WordPress. For instance, if you have several heading blocks, you can delete one to enhance the readability of your content.
Now, let’s explore how to easily remove blocks in WordPress. This tutorial presents four methods, and you can click on the links below to navigate to the method that suits you best:
- Method 1: Deleting a Block in the WordPress Editor
- Method 2: Hiding a Block in WordPress
- Method 3: Removing Core Blocks in WordPress
- Method 4: Removing a Plugin Block in WordPress
- Bonus: Creating a Synced Pattern in WordPress
- Frequently Asked Questions
Method 1: Deleting a Block in the WordPress Editor
If you want to remove blocks from your content, this method is perfect for you. Please note that while these blocks will be deleted from your WordPress blog posts, they will still remain in the block menu.
Begin by selecting the block you wish to delete by simply clicking on it.
Next, click the three-dot icon in the block toolbar to open a menu. From there, choose the ‘Delete’ option to remove the block from your blog post.
Alternatively, you can delete multiple blocks at once. First, select all the blocks you want to remove by dragging your mouse over them.them.
Then, click the three-dot icon in the block toolbar and select the ‘Delete’ option from the menu.
If you’re looking for a quicker method, you can delete a block in the content editor by pressing Shift + Alt + Z on Windows and Linux, or ⌃ + ⌥ + Z on macOS.
Method 2: Hiding a Block in WordPress
If you prefer not to completely remove a block, this method is for you.
Utilize the WordPress block visibility feature to hide the block from the menu, allowing you to easily restore it whenever necessary.
Start by accessing the block editor and clicking the three-dot icon located in the top right corner of the screen. This will reveal a dropdown menu where you should select the ‘Preferences’ option.
A popup will appear on the screen. Navigate to the ‘Blocks’ tab and uncheck the boxes next to the blocks you wish to hide in the post editor.
You can also disable blocks from plugins, such as the WPForms block or the Soliloquy block, using this method.
After making your selections, simply click the ‘X’ icon to close the popup. You have now successfully hidden the selected blocks in WordPress.
To see the changes, click the ‘+’ button in the top left corner to open the block menu. You will notice that the blocks you chose to hide are no longer visible.
If you want to restore those blocks, click the three-dot icon again and select the preferences option.
When the popup opens, go to the ‘Blocks’ tab and click the ‘Reset’ link to make all blocks visible again.
The downside of this method is that you cannot unhide individual blocks. Clicking the ‘Reset’ link will restore visibility to all previously hidden blocks, not just one.
If this limitation is a concern for you, consider using the next method.
Method 3: Removing Default Blocks in WordPress
This approach utilizes an ‘allowlist’ to completely eliminate default blocks from the WordPress editor.
This is perfect for establishing a highly controlled editing environment, as you will specify exactly which blocks (such as image, paragraph, or heading blocks) are permitted, while all others will be removed.
To eliminate a core WordPress block, you will need to insert a PHP code snippet. While you can add this code to your theme’s functions.php file, we strongly advise against it.
A small error in the code could disrupt your site, and any changes will be lost the next time you update your theme.
That’s why we recommend using WPCode instead. It is the leading WordPress code snippets plugin available and the safest way to incorporate custom code into your website.
We utilize it to manage code snippets on our own websites, and it has consistently performed well for us. To find out more, check out our comprehensive WPCode review.
☝Note: You can use the free version of WPCode for this tutorial. However, upgrading to the pro version will provide access to additional features.
First, install and activate the WPCode plugin. For instructions, refer to our beginner’s guide on how to install a WordPress plugin.
After activation, go to the Code Snippets » + Add New SnippetNavigate to the page in your WordPress dashboard and click the ‘Use Snippet’ button located under the ‘Add Your Custom Code (New Snippet)’ section.
You will be taken to the ‘Create Custom Snippet’ page, where you need to provide a name for the code snippet you are about to create.
Next, select ‘PHP Snippet’ from the Code Type dropdown menu on the right.
Then, enter the following custom code into the ‘Code Preview’ box:
add_filter( 'allowed_block_types_all', function( $allowed_blocks, $editor_context ): array { $allowed_blocks = [ 'core/paragraph', 'core/heading', 'core/list', 'core/list-item', 'core/quote', 'core/preformatted', 'core/pullquote', 'core/table', 'core/gallery', 'core/image', 'core/video', 'core/spacer', 'core/separator', 'core/shortcode', 'core/embed', ]; return $allowed_blocks;
}, 100, 2 );
This code utilizes a WordPress filter known as allowed_block_types_all. This filter specifies which blocks are allowed in the WordPress editor.
This code specifies a list of core blocks that are permitted on your website. Any block not included in this list, such as the ‘Verse’ block, will be automatically excluded from the block editor.
If you wish to remove a block that is included in the code, like the ‘Separator’ block, simply delete it from the code snippet.
Conversely, if a block is not included in the code snippet but you want to keep it, you can add its name to the list of allowed blocks.
To do this, type ‘core/’ followed by the name of the block, like so:
‘core/verse’,
Next, navigate to the ‘Insertion’ section and select the ‘Auto Insert’ option.
After doing this, the custom code will be executed on your site automatically when activated.
Then, return to the top and switch the ‘Inactive’ toggle to ‘Active’.
Finally, click the ‘Save Snippet’ button to save your changes.
You can now go to the block editor to observe the changes.
In the block menu, you will see that the classic, cover, separator, file, and several other blocks have been removed because they were not included in your code snippet.
Method 4: Removing a Plugin Block in WordPress
This approach is useful when you need to eliminate a block that was added by a plugin.
Numerous WordPress plugins introduce blocks in the content editor, making it easy to incorporate the plugin’s features into your blog posts or pages.
For example, the All in One SEO for WordPress plugin adds blocks for FAQs, breadcrumbs, table of contents, and HTML sitemaps to the content editor.
However, there may be times when you find a block provided by the plugin unnecessary for your content. In such cases, you can remove the plugin’s block using custom code.
To accomplish this, you will need WPCode, the top code snippets plugin and the most secure way to add custom code to your website.
First, install and activate the free WPCode plugin. For detailed instructions, refer to our step-by-step guide on installing a WordPress plugin.
After activation, navigate to the Code Snippets » + Add Snippet section in the WordPress dashboard. Here, click the ‘Use Snippet’ button located under the ‘Add Your Custom Code (New Snippet)’ option.
On the ‘Create Custom Snippet’ page, begin by entering a name for your code snippet to help identify it later.
Next, select ‘PHP Snippet’ as the Code Type from the dropdown menu on the right.
Next, insert the following code snippet into the code preview box:
Make sure to substitute the name of the plugin block with the block you wish to remove.
add_action( 'init', function() { unregister_block_type( 'aioseo/breadcrumbs' );
}, PHP_INT_MAX );
To find this name, open the Gutenberg editor and add the plugin block to your page or post.
Then, click the three-dot icon in the top right corner to access the dropdown menu. From there, switch to the code editor.
Once you are in the code editor, look for an HTML comment that begins with .
The complete name of the block, such as aioseo/breadcrumbs, will appear immediately after that opening tag.
Copy this name and return to the ‘Create Custom Snippet’ page to paste it.
Next, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode.
This option will automatically run the custom code snippet when activated.
After that, change the ‘Inactive’ switch to ‘Active’.
Finally, click the ‘Save Snippet’ button at the top to save your settings.
Begin by accessing the block editor on your WordPress site and locate the block you wish to remove.
You will notice that the removed block still appears in the menu; however, when you try to add it to your page or post, it will display an invalid block error.
Bonus: How to Create a Synced Pattern in WordPress
In addition to hiding blocks, you can save time by creating Synced Patterns, previously known as ‘Reusable Blocks’ in earlier versions of WordPress.
This functionality allows you to save a block or a collection of blocks for use across different posts and pages. When you make updates to the synced pattern in one location, it automatically reflects everywhere it has been used.
For instance, you can create a synced pattern for calls to action, feedback forms, affiliate products, and more. To do this, open the block editor and enter the content you want to turn into a reusable block.
Next, click the three-dot icon in the block toolbar to access a dropdown menu. From there, choose the ‘Create Pattern’ option.
Afterward, simply name your block and click the ‘Create’ button to save your settings.
Now, the reusable block will be stored in the WordPress database, allowing you to easily add it to your pages or posts through the block menu.
For detailed guidance, check out our tutorial on creating a reusable block in WordPress.
Common Questions
Here are some common questions our readers ask about removing a block in WordPress:
What is the difference between deleting, hiding, and removing a block?
Deleting a block removes it from a specific post or page, but the block type remains available in the editor. Hiding a block removes it from the block menu, but you can easily restore it from the Preferences panel.
Removing a block using code completely disables it site-wide, preventing anyone from using it.
Can I undo the removal of a block?
Yes, you can reverse the changes. If you hid a block, you can unhide it from the ‘Preferences’ menu.
If you removed a block using code in WPCode, you can simply deactivate or delete that specific code snippet to restore the block.
Will hiding or removing blocks improve my website’s speed?
Hiding or removing blocks primarily affects the backend editor where you create content. It has a minimal impact, if any, on the frontend speed that your visitors experience.
The main advantage is enhancing your workflow. A cleaner interface allows you to locate the blocks you need swiftly, leading to more efficient writing.
We trust this article has helped you understand how to easily remove blocks in WordPress. You might also be interested in our beginner’s guide to using the WordPress block editor and our compilation of common block editor issues along with their solutions.
If you enjoyed this article, please consider subscribing to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.



