4 Effective Methods to Remove or Hide Blocks in WordPress
Tutorials

4 Effective Methods to Remove or Hide Blocks in WordPress

Maintaining a clean and efficient WordPress editing environment can significantly enhance your workflow. Many experienced developers find that removing or hiding unnecessary blocks from the Gutenberg editor helps streamline content creation and reduces clutter.

Simplifying the block interface allows you to focus on essential tools, leading to improved productivity and a more organized workspace.

This guide provides comprehensive, step-by-step instructions for managing blocks within WordPress, offering multiple approaches to suit different needs.

Understanding When to Remove, Hide, or Delete WordPress Blocks

WordPress sites using the Gutenberg editor often include numerous blocks that may not be relevant to specific content strategies. For example, a business website might never require the Verse block designed for poetry or lyrics, while a photography blog might rarely use complex table blocks.

Add the Verse block from the block menu

Removing irrelevant blocks creates a more focused editing interface tailored to your specific needs. Alternatively, you can temporarily hide blocks using WordPress's built-in visibility settings, preserving their functionality while keeping the interface clean.

For content editing purposes, deleting individual blocks from posts or pages removes specific content without affecting the block's availability in the editor. This is useful for refining existing content structure and readability.

Delete blocks

Below are four practical methods for managing blocks in WordPress. Use the following links to navigate directly to your preferred approach:

Method 1: Delete Individual Blocks from Content

This method removes blocks from specific posts or pages without affecting their availability in the block menu. It's ideal for content editing and restructuring.

Begin by selecting the block you wish to delete with a single click. Then, click the three-dot menu icon in the block toolbar and choose the 'Delete' option from the dropdown menu.

Delete a WordPress block

For removing multiple blocks simultaneously, drag your cursor to select all relevant blocks. Then access the three-dot menu and select 'Delete' to remove them all at once.

Delete multiple blocks in WordPress

Keyboard shortcuts provide an efficient alternative: use Shift + Alt + Z on Windows/Linux or Control + Option + Z on macOS to delete selected blocks quickly.

Method 2: Temporarily Hide Blocks from the Editor

This approach uses WordPress's native block visibility settings to hide blocks without permanent removal, allowing easy restoration when needed.

Open the block editor and click the three-dot icon in the top-right corner. Select 'Preferences' from the dropdown menu to access configuration options.

Click the three-dot icon and select the Preferences option

In the preferences popup, navigate to the 'Blocks' tab. Uncheck the boxes next to any blocks you wish to hide from the editor interface, including both core blocks and plugin-specific blocks.

Uncheck the boxes to hide blocks

Close the preferences window and click the '+' button to open the block menu. You'll notice the selected blocks are no longer visible.

Hidden blocks preview

To restore hidden blocks, return to Preferences > Blocks and click the 'Reset' link. Note that this restores all hidden blocks simultaneously rather than individually.

Click the Reset link

Since this method doesn't allow selective restoration of individual blocks, consider the following approach if you need more granular control.

Method 3: Remove Core Blocks Completely

This advanced method employs an allowlist approach to permanently remove default WordPress blocks, creating a highly controlled editing environment where only specified blocks remain available.

Implementation requires adding PHP code to your WordPress installation. Many developers recommend using a dedicated code management plugin rather than modifying theme files directly, as this approach prevents code loss during theme updates and reduces the risk of site-breaking errors.

After installing your preferred code management plugin, create a new snippet and add code that defines which blocks should remain accessible. This typically involves filtering the allowed block types to include only those essential for your specific use case.

This method provides precise control over the editing interface but requires careful planning to ensure all necessary functionality remains available for content creation.

Share this article

Need Help With Your WordPress Project?

I offer professional WordPress and WooCommerce development services tailored to your needs.

Get in Touch
WhatsAppChat on WhatsApp