Apps Ballance Chat Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Link Lock Log_Out Map Marketing Mobile_UI Navigation POS Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

Content Restrictions Shortcodes

Iain Poulson avatar
Iain Poulson Last updated on March 6, 2021

The content restriction shortcodes allow you to restrict access to content on your website pages/posts. The content can be restricted as a whole or you can also restrict parts of your content.

To restrict content on your site, open up the shortcodes editor and select one of the options from the “Restrictions” menu.

A window ( displayed into the screenshot above ) will appear, displaying all the available parameters.

It is recommended that you always use the shortcodes editor to add shortcodes to your pages/posts. In this way you’re sure your shortcode has been added with the correct parameters configuration.

Restrict to logged in users only

This shortcode is extremely easy to use and requires no further configuration. To hide your content simply wrap your content within the shortcode.

Example usage:

[wpum_restrict_logged_in] add the content you wish to restrict here [/wpum_restrict_logged_in]

Restrict to specific users only

This shortcode allows you to restrict content to specific users only. It means that only the users specified will have access to the content.

Example usage

[wpum_restrict_to_users ids="1, 55, 80"] content here [/wpum_restrict_to_users]

Separate each user id with a comma like in the screenshot here:

Restrict specific user roles only

This shortcode allows you to restrict content to specific user roles only. It means that only the specified user roles will have access to the content.

[wpum_restrict_to_user_roles roles="subscriber, administrator"] content here [/wpum_restrict_to_user_roles]

Note: the roles parameter above accepts only user roles names NOT the titles.

Here’s a list of the default user roles names ( NOT TITLES ) that come with WordPress

  • administrator

  • editor

  • author

  • contributor

  • subscriber

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket