Content Restriction Shortcodes

Use content restriction shortcodes to hide content from certain set of users. You can hide the content in anywhere a shortcode is processed, like posts, pages or custom post types.

You can access the content restriction shortcodes screen using the “Shortcodes” menu item under “Roles”.

To add a new shortcode click on the “Add New” button.

Name – To identify the shortcode.

Shortcode – This will be the actual shortcode to use.

User Type – Type of users to whom the content will be visible.

  • All Users – Content will be visible to all users.
  • Logged-in Users – Content will be visible to only logged in users.
  • Guest Users – Content will be visible to all non-logged in users.
  • Users in Role – Content will be visible to users who belong in the selected roles.


Once you create a content restriction shortcode, wrap your content with the shortcode tags for the configuration to take effect. For example if your shortcode was “wptest“, then write your content inside the following tags.

[wptest] Your content. [/wptest]

The shortcode listing table will display the tags to use within the “Shortcode” column.