The Content Restriction tab in the BasePress Settings page, allows you to restrict content in your knowledge base according to multiple user roles.
Below is a description of what each settings does:
- Enable content restriction: This is an opt-in feature so here you can choose to enable it or not.
- Redirected Pages: When visitors follow links to your restricted content you can choose if you want to redirected them to a 404 page. There are three options to choose from which will cover most scenarios:
- All Pages: When visitors reach any page in your KB that they can’t access, they will be redirected. This includes any section, subsection or article. When you enable this option restricted sections and articles aren’t visible anywhere else in your Knowledge base. It’s as if they don’t exist for the restricted users.
- None: Visitors can see all sections and articles but when they access restricted articles, a restricted content notice appears. You can also show a teaser and login form here.
- Sections only: This is a mix of the first two options. Content is not visible anywhere as in All Pages option. Although if a visitor accesses an article with a direct link the restricted content notice appears as with the None option.
- Restricted page notice: The message that appears to users when for any reason they reach a restricted article.
- Restricted search snippet notice: The message that appears on the search results for restricted articles. This works when Restricted Pages is set to None.
- Show teaser: This allows you to show a small portion of the article content, to get the user’s interest. Enable if needed.
- Teaser length in characters: Here you can customize the length of the teaser
- Show login form: Enable this option to add a login form after the content restriction notice. This allow users to log in, if they have the right privileges to view the content in the article.
- Order Roles alphabetically: Content restriction adds a few extra controls to the edit screen of the Sections and Articles in your KB. The edit screen shows a list of the user roles which are sorted according to how they are registered in WordPress. Enable this option to sort them alphabetically.
- Show admin columns: When you visit Knowledge Base > All Articles you’ll see a list of all the articles in your Knowledge Base(s). When you enable this option each article in the list will show the user roles that have access to it.
Read more about the BasePress Content Restriction feature.