Restrict Content by User Roles

Restrict Content by User Roles

This feature allows you to restrict post/page/custom post type content based on user roles using a shortcode. You can place your restricted content within the shortcode to limit the access.

Allow Content for User Roles

This feature allows you to allow content for certain user roles. You can use allowed_roles attribute to define the user roles for allowing content. Let’s take a look at the usage of this attribute.

Allowing Content for One User Role


[wppcp_private_content allowed_roles="subscriber" ]
Private Content for Subscriber User Role
[/wppcp_private_content]

Allowing Content for Multiple User Roles


[wppcp_private_content allowed_roles="subscriber,editor" ]
Private Content for Users with
Subscriber or Editor User Role
[/wppcp_private_content]

Allowing Content for Multiple User Roles of Single User

[wppcp_private_content allowed_roles="subscriber,editor" role_operator="AND" ]
Private Content for Users with
Subscriber and Editor User Roles
[/wppcp_private_content]

Block Content for User Roles

This feature allows you to block content for certain user roles. You can use blocked_roles attribute to define the user roles for blocking content. Let’s take a look at the usage of this attribute.

Blocking Content for One User Role


[wppcp_private_content blocked_roles="subscriber" ]
Private Content Blocked for Subscriber User Role
[/wppcp_private_content]

Blocking Content for Multiple User Roles


[wppcp_private_content blocked_roles="subscriber,editor" ]
Private Content Blocked for Users with
Subscriber or Editor User Role
[/wppcp_private_content]

Blocking Content for Multiple User Roles of Single User


[wppcp_private_content blocked_roles="subscriber,editor" role_operator="AND" ]
Private Content Blocked for Users with
Subscriber and Editor User Roles
[/wppcp_private_content]

WP Private Content Pro

Extend Features of Free Version
Simple Setup
Advanced Restriction Rules
Membership & Private Page Management
Priority Support
VIEW MORE