Restricted for a Certain User Only

CM Site Access Restriction Demo

Below you can see 3 areas which contain the content that can be visible only for a certain user.

Please, use credentials of demo users to see different content which is displayed for each of the users.

Lower you can find the guide about how this content was restricted.

Demo User #1:

Username: demo1 | Password: demo1

Demo User #2:

Username: demo2 | Password: demo2

Demo User #3:

Username: demo3 | Password: demo3

Restricted content #1
Restricted content #2
Restricted content #3

How This Page Was Restricted?

Restricting certain contain with additional conditions is easy! It can be done using a shortcode [aсcess].

The shortcode has lots of parameters (*full list can be found below). For example if we need to restrict part of the content for a certain user and add some message, we need to use parameters userid and deniedtext.

You can find user ID in its link on the back-end as shown on the screenshot below.

So, for example, we want to show some content only to certain user and display a message instead of the actual content for other users. We need to wrap the restricted content with opening and closing shortcodes. For example:

[aсcess userid="10" deniedtext="Restricted content #1"] Some content [/aсcess]

If you want to display this content to more than one user, you can add a few user IDs separated by comma, like this: userid="10,11,12"

On our demo page, we are using a Divi theme. So here's how we implement the shortcode:

Then you just need to save the changes and that's all.

Below you can see the full list of the shortcode parameters with examples of using.

CreativeMinds Site Access Restriction Plugin for WordPress allows you to lock away your exclusive content and give access only to valued members. It also allows you to control which WordPress users can view each post or page on your site.

For more information go to the plugin product page