The easiest and the most efficient way to restrict read access to some of your content to members only is to separate it as a custom post type and exclude read access to this post type for visitors.
For example, in our hypothetical membership site, we want to hide Advanced tutorials from regular visitors and grant read-only access to Subscribers, and Premium and VIP members.
We will create a Custom Post Type for Advanced tutorials and then use the Toolset Access plugin to restict access to this post type.
Controlling access on a specific Post Type level is one of the most common cases you will deal in membership sites.
- All existing and new posts of this post type will be automatically hidden. No additional action to remember when adding new courses.
- Archive pages for this post type will be automatically hidden as well.
- The posts of the post type will be automatically excluded from RSS feeds.
- It will be easier for you to handle related email notifications (with tools such as MailChimp or the MailPoet plugin)
- Go to Toolset -> Post Types and create a new Post Type: Advanced tutorials.
- Go to Toolset -> Access Control, choose the Post Types tab.
- Locate the Post Type you have just created – Advanced tutorials – and click on its name to expand it.
- Uncheck the checkbox field in the Read column for the Guest role.
- Save your changes.
Now only logged-in users will be able to read/view the posts of the Advanced tutorial post type.
What will visitors see instead?
By default, they will see the “Page not found” page (404 error) your theme provides. You can replace this page with your custom template by clicking the edit (pencil) icon.
Toolset Access offers you more granular control over read access. Please check the sidebar list of other tutorials how to set advanced read access to content.
If you have any questions please not hesitate to post them on the Memebership Sites support page.