Restrict Access & Visibility of Contents in WordPress Block Editor
Do you want to learn how to restrict access and visibility of content in the WordPress Block Editor?
Many web developers and site builders are building more websites using WordPress’s “Gutenberg” block editor, which also powers the post and page writing experience.
If you want to manage the visibility of specific blocks and content in posts or pages created with the block editor and restrict access based on users’ logged-in status, roles, and membership plans, this article is for you.
Table of Contents
Using Conditional Blocks Plugin
We will be relying on the powerful Conditional Blocks plugin to achieve this. Ensure you have the plugin installed and activated on your site.
To restrict content visibility in the WordPress block editor, click on the content to reveal the block setting, scroll to the “Visibility Conditions” section, and click the “Configure Conditions” button.
Select “Active Membership Plan” under ProfilePress as the Condition, then the membership plans whose active subscribers the block will be shown to or hidden from (based on the Block Action).
Don’t forget to save your changes when done.
The plugin also allows you to restrict content in the block editor based on user role, logged-in status, device type, and more.
Using Block Visibility Plugin
We will also show you how to use the powerful Block Visibility plugin to achieve this.
Start by installing and activating the Block Visibility plugin on your site.
Also, ensure a user role is associated with your membership plans. This is important if you want to restrict content by membership plans.
Content Restriction
To restrict content visibility in the WordPress block editor, click on the content to reveal the block setting and scroll to the “Visibility” section.
Select the user role associated with the plans to restrict the content to users or customers of specific membership plans. For example, in the image above, we selected the role “Standard” associated with a Standard membership plan.
Only the selected user roles can access or see the content by default. If you would rather hide the content to the selected user role, enable the “Hide from selected roles”.
Don’t forget to save your changes when done.
Conclusion
We hope this article has helped you learn how to restrict access and visibility in the WordPress block editor.
You might also want to explore our articles on restricting visibility in WordPress navigation menus and controlling Elementor content visibility.