University of Wisconsin–Madison

Hide blocks and page content

Last updated:

You can hide content using WordPress’s built-in hide block feature with some customizations. In the UW Theme, this option is intentionally limited to the Group and Cover blocks to ensure hidden content behaves predictably and is easy to manage.


About hiding blocks

You may want to keep content in the editor without showing it on the published page. For example, when working on draft content, layouts, or hiding seasonal content.

Hidden blocks:

  • Are not visible in the block editor until unhidden
  • Do not appear on the published page
  • Are not read by screen readers
  • Display a slashed eye icon in List View
Group block in the List View with slashed eye icon indicating it's hidden from view.
Example of Group block hidden in List View

How to hide blocks

UW Theme 2.0 uses WordPress’s built-in hide block feature, but is limited to the Group and Cover blocks. When you hide a Group or Cover block, all content inside it is hidden as well.

To hide multiple items, group them together first and hide the Group.

Steps to hide blocks

  1. In List View, select the Group or Cover block.
  2. Open the More options menu (three-dots) and select Hide.
    • Hide option selected in the dropdown after clicking the More options menu (three vertical dots) in List View
  3. Check the box next to Omit from published content and click Apply.
    • Omit from published content checkbox in the hide block modal
  4. In List View, the block will have a slashed eye icon next to it, indicating it’s hidden.

WordPress 7.0 notice

Starting with the release of WordPress 7.0, it’s possible to hide blocks by device type (mobile, desktop, or tablet). This is not available in UW Theme 2.0 yet due to accessibility concerns. The UW Theme team is continuing to evaluate the feature as it matures in future releases.

There is also a known issue where content from hidden blocks may appear in page excerpts. Until this is fixed in WordPress Core, you can manually add a page excerpt as a workaround to prevent the hidden content from appearing.