Version 1.2 was a fairly minor release, but addressed a feature request from a user in the plugin support forum on WordPress.org. As a result, the Visibility by User Role control has been improved with the new ability to hide blocks based on selected user roles.
Hide on Selected Roles
The Visibility by User Role control allows you to decide who can see a block based on the user’s “role”. The control comes with four options:
- All — Show the block to everyone
- Public — Only show the block to the public (i.e. users that are logged-out of our website)
- Private — Only show the block to users that are logged-in to your website
- User Role — Show the block based on the specific roles of a user
The fourth option, User Role, is the most granular and allows you to pick which roles the block should be visible for, such as Administrators, Customers, Editors, etc. The plugin pulls all available roles on your WordPress site, including any that have been added by your theme or third-party plugins.
This functionality is great if you only wanted to show the block to, say, Administrators. However, what if you wanted to show the block to everyone BUT Administrators? Prior to version 1.2, there was no quick and easy way to do this. Now there is with the “Hide on Selected Roles” toggle.
With this setting enabled, the plugin will now hide the block to all users with the selected roles. This was a excellent feature request and the feedback was most appreciated. The new toggle significantly improves the functionality of the Visibility by User Role control.
A rough roadmap for future versions is outlined below.
- Refinement of the contextual indicators, especially for themes with dark backgrounds and themes with “dark mode” functionality.
- Compatibility with the new full-site editing functionality coming in WordPress v5.6+.
- Keyboard shortcut for hiding blocks.
- The ability to limit who can use the visibility controls provided by Block Visibility based on user roles.
Have a features that you would like to see? Find an issue with the plugin?
Please leave a comment below or in the support forum in the Plugin Repository. Thanks for using Block Visibility and we hope you find it useful.