Restricted Blocks Restricted Blocks is a WordPress plugin that allows you to restrict access to specific Gutenberg blocks based on a wide variety of conditions.
You can, for example, restrict content based on a user’s role, hide content from users living in specific geographic locations, conditionally display content based on a user’s device, make parts of a post unavailable to search engines, and more.
This section will provide details on the types of constraints and related usage examples.
This restriction, when enabled, removes a block from the front end.
Restricted content is only displayed after a successful password submission.
The plugin displays content associated with this restriction if the user meets the age requirements set in the backend. Note that the user can declare their age by submitting their date of birth with the provided form.
This type of restriction allows you to display or hide blocks based on the user’s location.
This restriction allows you to display tiles based on the user’s device.
With this restriction, you can display content within a specified time range.
This restriction uses user capabilities to determine whether or not to display a specific block.
This restriction allows you to display or hide blocks based on the visitor’s IP address.
Use this restriction to display content based on the presence of specific cookies.
With this restriction, you can display or hide content based on the information available in the HTTP headers.
You can customize the colors and typography of the elements displayed on the front-end with the 18 styling options available on the back-end.
Please refer to the plugin manual for more information on installing and using the plugin.
This plugin geo locates users with GeoLite2 . A free IP geolocation database provided by MaxMind.
Please note that to use the GeoLite2 database, you must create a MaxMind account and accept their terms of service.
The user’s device is detected with the Mobile Detect PHP class.