How to Effectively Manage and Remove WordPress Blocks to Improve User Experience

Image[1]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Coverage, Fast Response

During the WordPress website management process, you may encounter situations where you need to delete, hide or manage blocks. In this article, we will detail how to effectively manage and delete blocks in WordPress in different scenarios to enhance the user experience and editing efficiency of your website.

Why should I remove, hide or delete blocks in WordPress?

  1. Simplified Interface: Some blocks may not be relevant to your site's content, and removing them creates a cleaner, more focused editorial interface. For example, the poetry block may not be useful for a food or fashion blog.
Image[2]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Coverage, Fast Response
  1. Improve editing efficiency: The editing process can be simplified and less intrusive by hiding or deleting blocks that are not commonly used.
  2. content management: Removing specific chunks in content helps keep a post or page neat and readable.
Image[3]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response

Ways to Delete and Manage WordPress Blocks

Method 1: Delete the block in the WordPress editor

If you only want to delete a block in the content, you can use the following steps:

  1. Select the block to be deleted.
  2. Click the three dot icon in the block toolbar to open the menu.
  3. Select the "Delete" option.
Image[4]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response

This method will not remove the block from the block menu, but will remove it from the current blog post or page.

(computer) shortcut: Windows and Linux users can press Shift + Alt + ZFor example, macOS users can press ⌃ + ⌥ + Z to quickly delete selected blocks.

Image[5]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response

Method 2: Hide the block in WordPress

If you don't want to delete a block completely, you can choose to hide it:

  1. Open the block editor and click on the top right corner of thethree-pointicon, select "preference".
Image[6]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response
  1. Switch to "blocs" tab, uncheck the checkboxes next to the blocks you want to hide. You can also disable plugin blocks from here, such as WPForms blocks or Soliloquy blocks.
Image[7]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response
  1. When you're done, click "X"Exit Tip.

of this methoddrawbacksIt is not possible to unhide a block individually, only to restore them all.

Method 3: Remove the core block in WordPress

To remove the default WordPress core blocks, you can add PHP code snippets. We recommend using the WPCode plugin to securely add code snippets.

Image[8]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response
  1. Install and activate the WPCode plug-in.
  2. Access Code Snippets " + Add Code Snippet page, select "PHP Snippet" as the code type.
Image[9]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response
  1. Add the following code snippet:
add_filter( 'allowed_block_types_all', function( $allowed_blocks, $editor_context ): array {
    $allowed_blocks = [
        'core/paragraph',
        
        'core/list', 'core/list-item'
        
        
        'core/preformatted', 'core/pullquote', 'core/preformatted'
        'core/pullquote', 'core/table', 'core/preformatted', 'core/pullquote'
        'core/table', 'core/gallery'
        'core/gallery', 'core/image', 'core/gallery
        
        'core/video', 'core/spacer', 'core/video
        
        'core/separator', 'core/separator', 'core/shortcode', 'core/shortcode'
        
        'core/embed', 'core/video', 'core/spacer', 'core/separator', 'core/shortcode', 'core/embed'.
    ]; }
    return $allowed_blocks; }, 100, 2 ); return $allowed_blocks.
}, 100, 2 );
  1. Save the code snippet and activate it.

Method 4: Remove Plugin Blocks in WordPress

To remove the blocks introduced by the plugin, you can add custom code snippets using the WPCode plugin:

  1. Install and activate the WPCode plug-in.
  2. Add the following code snippet, replacing the aioseo/breadcrumbs is the name of the plug-in block to be deleted:
add_action( 'init', function() {
    unregister_block_type( 'aioseo/breadcrumbs' );
}, PHP_INT_MAX ).
  1. Save the code snippet and activate it.

Creating Reusable Blocks in WordPress

In addition to hiding unnecessary blocks, you can also create reusable blocks to save time and effort:

  1. Open the Block Editor and enter the content to be converted to a reusable block.
  2. Click the three dot icon in the block toolbar and select "creation mode"Options.
Image[10]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response
  1. Add a name for your block and click "establish"Button.
Image[11]-How to Effectively Manage and Remove WordPress Blocks to Enhance User Experience - Photon Flux | Professional WordPress Repair Service, Global Reach, Fast Response

Reusable blocks will be saved in the WordPress database and can be easily found in the block menu and added to a page or post.

reach a verdict

By using the above methods, you can effectively manage and remove blocks in WordPress, improving editing efficiency and user experience. Using the right tools and steps, it's easy to avoid common mistakes and ensure that your website's content management is more efficient and concise. Whether it's hiding, deleting or creating reusable blocks, these tips will help you better control and optimize your WordPress site.


Contact Us
Can't read the article? Contact us for free answers! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
Author: xiesong
THE END
If you like it, support it.
kudos0 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments