Restrict content on a page/post to specific users community role

Ultimate Member allows you to show or hide content to specific users' community roles. You can do this by wrapping the content with the following shortcode:

[um_show_content roles="member"] This text can only be seen by users who have role "member" [/um_show_content]

Role ID should be used in the roles and not attributes. You can find the Role ID in the wp-admin > Ultimate Member > User Roles table.

Show content to specific roles

[um_show_content roles="member"] <!-- insert content here --> [/um_show_content]

You can add multiple target roles, just use comma ' ,' in between roles.

[um_show_content roles="member,candidates,pets"] <!-- insert content here --> [/um_show_content]

Hide content from specific roles

[um_show_content not="member"] <!-- insert content here --> [/um_show_content]

You can add multiple target roles, just use comma ' ,' in between roles.

[um_show_content not="member,candidates,pets"] <!-- insert content here --> [/um_show_content]

Adding tags to text

It is possible to use common placeholders (tags) inside the shortcode. The shortcode converts common placeholders to proper values.

[um_show_content roles="contributor,subscriber"] {display_name} [/um_show_content]

What the specific role see

The restricted content on the page/post is hidden to the other community roles, and they see nothing on the page/post to indicate that there is content they cannot see.