Restrict Gutenberg Blocks

Overview

Ultimate Member offers a customizable content restriction feature for Gutenberg blocks, allowing administrators to control access to specific content based on user roles and login status. This feature is part of the "Content Restriction" settings and can be enabled by navigating to:  WP Admin > Ultimate Member > Settings > Access > Restriction Content

Next, enable the  "Content Restriction" settings for Gutenberg blocks. When Restricted Gutenberg Blocks is enabled, it allows for setting block restriction configurations in WP Admin. An additional option, Restricted Access Block Message, becomes available, enabling administrators to edit the restriction message using the WordPress editor.

By configuring these settings, administrators can create a personalized user experience by restricting content visibility based on specific conditions. This feature is particularly useful for businesses and online communities looking to optimize user engagement and security.

Restriction Settings

Restrict Access

This option allows administrators to define who can view a specific block.

Who Can Access This Block?

  • Everyone – The default state. All visitors, whether logged in or not, can see the block content.
  • Logged Out Users – The block content is only visible to visitors who are not logged in. Once a user logs in, the block content disappears for them.
  • Logged In Users – The block content is visible only to logged-in users. Visitors and non-members will not see this content. When selecting this option, an additional setting appears to specify which user roles can access the content.

Restriction Actions

When a block is restricted, the following actions can be applied:

  • Hide Block – The block becomes completely invisible to unauthorized users.
  • Show Global Default Message – Users will see the default block message set in wp-admin> Ultimate Member> Settings> Access> Restriction Content> Restricted Access Block Message, instead of the block content.
  • Show Custom Message – A custom message can replace the restricted block content. When this option is selected, an input field appears, allowing administrators to enter a personalized message. Visitors will see this custom message instead of the original block content. Once "Show Custom Message" is enabled, the "Custom Restricted Access Message" setting becomes available, where you can input the desired message.

Restricting Content to Verified Users

If the Verified Users extension is enabled, an additional option, "Lock to Verified Accounts Only", becomes available. This feature ensures that only verified users can access certain content, providing an extra layer of security and exclusivity.


Navigation Menu Restriction for Block and Non-Block Themes

Non-Block Themes

Non-block themes use the traditional WordPress editor (Classic Editor), where content creation follows a linear format without individual content blocks. Instead, design and layout are managed through custom page templates and theme-specific options. A well-known example is  the Twenty Twenty-One theme.

For instructions on restricting navigation menus in non-block themes, please refer to the Ultimate Member documentation.

Block Themes

Block themes utilize the Gutenberg editor, which introduces a modular approach to content creation. Unlike non-block themes, block themes allow users to build pages and posts using individual blocks, offering greater flexibility and customization. An example of a block theme is WP Twenty Twenty-Four.

Ultimate Member Navigation Menu Restriction for Block Themes

Ultimate Member provides advanced navigation menu restriction settings for block themes, allowing administrators to control menu visibility based on specific criteria. This feature ensures seamless user experience and precise access management within WordPress block themes.

How to Restrict Navigation Menus in Block Themes

  1. Activate a Block Theme: Ensure your WordPress site is using a block-based theme.
  2. Navigate to the Editor:  Go to WP Admin > Appearance > Editor.
  3. Locate the Navigation Menu:  In the Block tab, find the Navigation Menu.
  4. Enable Content Restriction:  On the right-hand side, go to the Ultimate Member: Content Restriction section and enable the "Restrict Access?" option.
  5. Configure Access Settings:  Adjust the restriction settings based on your preferences. You can choose to limit menu visibility based on user roles or login status.
  6. Restrict Access to Verified Users (Optional):  If the Verified Users extension is active, an additional option—"Lock to Verified Accounts Only"—becomes available. Enabling this setting ensures that only verified users can access the navigation menu.
    • This option appears when "Logged-in users" is selected under the "Who can access this block?" settings.
  7. Save Your Changes: Click Save to apply the configurations.

By leveraging these features, Ultimate Member enhances content control, security, and user personalization, ensuring a streamlined navigation experience tailored to your audience.