TUTORIAL

How to Restrict Access to WordPress Pages and Post by User Roles?

Last Updated: 4 mins By: User Registration Author

If you have a website, there might be a time when you need to restrict the content of your site to certain people. You might want to set the content of the site visible to only logged in users or be even more specific and make it visible to logged in users with specific roles. WordPress allows you to assign each logged in user with specific roles. One can then use this role and set content to be either visible or hidden. But, how do you restrict WordPress content to specific user? Don’t worry!

In this WPEverest article, we are going to teach you how you can restrict content by user roles with no trouble.

Why do you need to restrict content by user roles?

One thing is for sure; all of your visitors are not the same. When there is a number of people visiting your site you might want some confidential things to be accessible to a certain type of users with higher authority. Likewise, there are usually different types of plans and programs that customers sign in for according to their needs. So, you might need to restrict WordPress pages and content to the user as per the plans.

For example, you want to show the accounts page of your website to only premium users then, what do you do? This is where our Content Registration Add on comes in handy.

How to Restrict WordPress Pages and Content to specific user?

In a WordPress site, you can assign different roles to your users such as administrator, author, editor, contributor, subscriber, etc. You can even use some plugin to create custom roles like customer, member, student or similar. Then based on what roles they have, you might want to restrict content

Before assigning roles and restricting content to the users, you must first make your users register to your site. Our User Registration plugin is one of the best form plugins to make your users register in your site. So, go on and, install User Registration plugin first.

User Registration Plugin
User Registration Plugin by WPEverest

With User Registration, you can create registration forms with no trouble at all. It has the easy-to-use drag-and-drop form builder feature. So, anyone can create registration forms for their site.

Moreover, you can choose which user roles to be assigned to the user once they have filled the registration form. For this, go to the General Settings tab in the form builder. And, select the Default User Role.

Then, you need to get our premium Content Restriction Add on.

Content Restriction Add On
Content Restriction Add On

The Content Restriction Add-on is available on all of our premium plans.

If you want more details on the pricing, go to our Plans and Pricing page to choose the best plan for you.

Full Content Restriction

After you install and activate the Add-on, go to User Registration tab then, click on Settings. Then, click on the Content Restriction tab.

content by user roles there

Now, click on the drop-down option to Allow Access To specific roles. Then, Select the roles you want to restrict access to. Also, don’t forget to add the restriction message that will be shown to restricted users.

restrict content by user roles

After that, go to the post or page that you need to restrict. In the bottom of the page, you can see the Restrict This Content box. And, check the Restrict Full Content option.

restrict content by user roles

Not only can you restrict content by user roles but, you can also make any particular page or post accessible to specific users only.

Below the Restrict Full Content option, there is the Override Global Settings option. Check that option. Then, click on the drop-down menu for the Allow Access To option and select Choose Specific Roles.

After that, simply choose the user roles you want to give access to from the Allow Access To Roles option.

restrict WordPress pages and content to specific user

Partial Content Restriction

Similarly, you can also restrict content by user roles partially. The Content Restriction add-on provides a shortcode for that. Just insert the content you want to restrict inside the given Shortcode and, your job is done!

restrict content by user roles six

After you restrict pages or content by user roles, the user will see the restriction message you set up when they try to access that content or page.

restrict content to specific user

Wrapping up!

Hence, there are various reasons you need to restrict WordPress pages and content to specific user. According to your business plans and programs, there may be customers with different user roles. Similarly, you can restrict pages and content to the members of your website. Hopefully, you can now restrict content by user roles effortlessly with the help our User Registration Content Restriction Add on.

If you found this article helpful, don’t forget to share!

How to Restrict Access to WordPress Pages and Post by User Roles?

User Registration Author

We are a dynamic team of SEO Copywriters working to create compelling WordPress content that resonates with our audience. User Registration Author represents one of our talented authors dedicating their expertise into a solo project.

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top

Pin It on Pinterest