Restrict Gutenberg Blocks


Ultimate Member offers a customizable visibility feature for blocks that can be accessed through the settings below. This feature is based on the restriction blocks logic, which can be enabled by navigating to the "Content Restriction" settings located in wp-admin > Ultimate Member > Settings > Access >Restriction Content > Enable the "Content Restriction" settings for the Gutenberg Blocks.

By configuring these settings, you can have better control over your content and restrict access to specific blocks as per your requirements. The feature facilitates the creation of a more personalized user experience, which can be a valuable asset for businesses or communities seeking to optimize their online presence.

Restrict Access?

This enables the admin to set restriction settings for the selected block.

Who can access this block?

  • Everyone – Everyone is the default state for block and this means that everyone who visits your site will see this block content.

  • Logged out users – If you select this option, this block content will only be visible to visitors (e.g., logged-out users). When someone logs into your site they will no longer see this block content. 

  • Logged in users – If you select this option it means that this block content will only be visible to logged-in users. Visitors and non-members will not see this block content. Once the "Logged in users" option is selected, you will see the "What roles can access this block?" setting which shows all roles on your site. If you want to show block content to a certain role(s) then you can select the roles that will be able to see the block content.

Restriction action

Make this action if the block is restricted according to the conditions:

  • Hide block – It means that the block is invisible.

  • Show global default message – This means that visitors can see the global default message instead of the block content.

  • Show custom message – It means that visitors can see the custom message instead of the block content. Once the "Show custom message" option is selected, you will see the "Custom restricted access message" setting which allows you to type the custom message.

Restrict Block Content to Verified User#

When you activate the Verified Users extension, you gain access to an additional feature that allows you to control the visibility of your content. By enabling the "Lock to verified accounts only" option, you can limit access to certain parts of your content to only those users who have been verified. This is useful if you want to share sensitive or exclusive information with a select group of people while keeping it hidden from others who may not have the necessary credentials.

Themes Navigation Menu Gutenberg Restriction Settings

Non-Block Themes:

Non-block themes are built using the traditional or classic editor in WordPress. In these themes, content creation follows a linear approach without the use of individual blocks. Instead, users compose content more straightforwardly, and the design and layout are achieved through custom page templates and theme-specific options. This method is familiar to users accustomed to the earlier versions of WordPress. (e.g. WP Twenty Twenty-One theme). For the restriction of the navigation menus for non-block themes, go to this link.

Block Themes:

On the other hand, block themes embrace the newer WordPress block editor (Gutenberg). This editor introduces a modular approach to content creation, allowing users to build pages or posts using individual blocks. Each block represents a specific content element, providing greater flexibility and customization options. Block themes structure designs based on these blocks, resulting in a more dynamic and visually appealing layout. (e.g. WP Twenty Twenty-Four theme).

Ultimate Member Feature for Block Themes:

This feature enables you to customize access to navigation menus based on specific criteria, affording administrators precise control, particularly within the framework of block themes. Even in the context of the more straightforward content creation structure of block themes, Ultimate Member allows site administrators to carefully regulate the visibility and access permissions of navigation menus. This ensures a smooth user experience and effective access control within the WordPress environment, tailored specifically for non-block themes. To restrict your Navigation Menu Gutenberg Blocks, do the following steps below:

  • Once you've activated a block theme, navigate to wp-admin > Appearance > Editor
  • Locate the navigation menu on the side panel in the Block tab and scroll down to the Ultimate Member: Content Restriction Section. Enable the "Restrict Access?" option.
  • Configure your settings based on your preferences. Each available options are thoroughly described in the preceding section of this article.
  • If the Verified Users extension is active, an additional option will be visible. You can lock the navigation menu block, allowing access exclusively to verified users by enabling the "Lock to verified accounts only" option. This option becomes accessible when you select "Logged in users" from the "Who can access this block" settings. 
  • Click on the Save button, to save your configurations.