Limit access to posts and pages – simple conditions
After you’ve created a level, configured its options and added some members, it’s time to make it restrict content on your WordPress site.
Good to know: To prevent lock out, administrators will by default have access to all content and do not need to be member of any Access Levels.
Restrict Blog Page and All Posts
User is logged into the admin panel as an Admin.
- Go to the Edit Level screen for the selected level in User Access > Access Levels
- In the Conditional Logic box, click on the “– Select content type –“ dropdown and select Posts
- In the newly added condition, you’ll see an input field saying “All Posts / Blog Page”. Leave it empty.
- That’s it! The Blog page and all individual posts can now be visited only by members of this Access Level.
Good to know: Access Conditions are saved automatically on change, you do not need to click Update everytime.
Restrict Pages or Post Types
User is logged into the admin panel as an Admin.
- Go to the Edit Level screen for the selected level in User Access > Access Levels
- In the Conditional Logic box, click on the “– Select content type –“ dropdown and select Pages or any custom post type
- In the newly added condition, click on the input field to select individual items. You can search by typing.
- That’s it! The pages for the selected post types can now be visited only by members of this Access Level.
Good to know: Access Conditions will not hide items from archive pages, search results, widgets, custom lists, or the WP REST API.
Access Condition Settings
If you click on Settings in the upper right corner of a condition group, you will see some extra options:
- Page Types
- Target content in a specific state, such as all single posts, the Blog page (posts archive), or both.
- Exception
- Content selected in this condition group will not be restricted. There must be at least 1 group that is not using this option.
- Auto-select new children of selected items
- If a page, category, or other hierarchical item has been added as a condition, any future children/sub-items will be added as conditions as well.
- Unlock Time for new members
- Select how long a user needs to be a level member, before the content gets accessible. This is also sometimes referred to as drip content.