How to Restrict Content in WordPress to Registered Users?

Restrict content in WordPress

Do you want to restrict content in WordPress to registered users only?

UserPro Plugin allows you to restrict content in WordPress with its handy feature. You can restrict users to a view a particular page content into your WordPress site.

In this article, we will guide you on how to restrict content.

Restrict content in WordPress

First, you need to install and activate the UserPro Plugin. For more details, see this step by step guide on how to install a plugin in WordPress.

After activation, you need to visit UserPro » Restrict Content »

Setting up Lock entire site feature for All Users in WordPress

Go to Restrict Content » Global Restrict/Lock Settings

There is an option available to lock entire site for guests. Select “Yes”.

WordPress content restriction

Here you can,

– Enter the Page ID that guests will be redirected to if the entire site is locked
– Enter the page ID of pages the guest users can view when all site is locked,
– Other options

  • Redirect guests from homepage to custom URL
  • Redirect members from homepage to custom URL

WordPress content restriction

Setting up Restricted Content in WordPress To Specific Users Only

Restrict Content » Specific Restrict/Lock Settings

There are two options available to make restricted content available to specific users. You can select from the drop-down menu.

  • Only Verified Members
  • All Registered Members

After that Enter redirect URL if a whole page is locked/restricted

Restrict users from viewing content using shortcode in WordPress

This shortcode will restrict users from viewing any content entered in between shortcode :

[userpro_private]
[userpro template=postsbyuser ]
[/userpro_private]

Restrict users from viewing content based on their role for this there is a parameter for the shortcode

You need to use this shortcode :

[userpro_private restrict_to_roles=administrator,subscriber,author]
[userpro template=postsbyuser postsbyuser_type=product]
[/userpro_private]

Setting up Restriction for a particular Page or Post

There are Four options available to restrict the page or post in a particular page to particular roles, members and verified accounts.

  • No restriction
  • Restricted to All Members
  • Restricted to Verified Accounts
  • Restricted to User Roles

Page or post restriction - WordPress

With this, you are all set to set up content restriction for your WordPress site.

Another article that you might also want to check out is how to create a WordPress member directory

If you like this article, then please follow us on Facebook and Twitter for more updates and articles.

If you have any queries please let me know in the comments below.

One thought on “How to Restrict Content in WordPress to Registered Users?

  1. Thanks Madhulika for making our lives easier with your precise information on how to setup restricted content in WP.
    This sounds like a very good idea to promote material for VIP members/customers.

Comments are closed.