Title: Content restriction shortcode not working
Last modified: December 7, 2021

---

# Content restriction shortcode not working

 *  Resolved [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/)
 * Content restriction shortcode not working when adding more than 1 role.
 * [um_show_content roles=’um_trustee,um_owner’]
    [/um_show_content]

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15139136)
 * Hi [@tceg](https://wordpress.org/support/users/tceg/)
 * What’s the role assigned to your test account? Try using an account with um_trustee
   or um_owner role.
 * Regards.
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15139581)
 * I have tested it doesn’t work. It works only with the first one in the comma 
   separated list.
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15142184)
 * Hi [@tceg](https://wordpress.org/support/users/tceg/)
 * Does your site have any caching plugin or server cache module? If so, please 
   try disabling it temporarily and see if this is an issue with the cache.
 * Regards,
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15142371)
 * Hi [@champsupertramp](https://wordpress.org/support/users/champsupertramp/)
 * No caching plugin or server module installed.
 * kind regards
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15146643)
 * Hi [@tceg](https://wordpress.org/support/users/tceg/)
 * How many roles are assigned to your test account?
 * Could you please provide a screenshot of your User Roles? Please go to WP Admin
   > Ultimate Member > User Roles. You can upload the screenshot via imgur.com and
   then share the image URL here so we can review it.
 * Regards,
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15149885)
 * HI [@champsupertramp](https://wordpress.org/support/users/champsupertramp/) ,
 * The default roles are assigned.
 * Please see link below with screenshot.
 * [https://imgur.com/zuUstJW](https://imgur.com/zuUstJW)
 * I just find it strange that only the role that is first gets used I tried it 
   with both content restriction shortcodes both are the same.
 * Kind regards
    -  This reply was modified 4 years, 6 months ago by [tceg](https://wordpress.org/support/users/tceg/).
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15158177)
 * Hi [@tceg](https://wordpress.org/support/users/tceg/)
 * What are those default roles assigned to your test account? What are their user
   role slugs?
 * Regards,
 *  Thread Starter [tceg](https://wordpress.org/support/users/tceg/)
 * (@tceg)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15158484)
 * Hi, [@champsupertramp](https://wordpress.org/support/users/champsupertramp/)
 * I’ve tested with three different accounts each having a different. Using the 
   below shortcode
 * [um_show_content roles=’um_trustee,um_owner’]
    [/um_show_content]
 * with different roles as the first one in the comma separated list only the first
   one applies e.g. the above shortcode should allow both um_trustee and um_owner
   to see the restricted content but only um_trustee are then able see the content
   this happens with different as the first role in the list.
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15173802)
 * Hi [@tceg](https://wordpress.org/support/users/tceg/)
 * Please try clearing the cache in WP Admin > Ultimate Member > Dashboard > User
   Cache and then try testing the shortcode.
 * I think this is an issue with the UM cache. It doesn’t clear the old role after
   changing the role. This has been fixed in the pre-release version 2.3.0.
 * Regards,
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15187762)
 * Hey there!
 *  This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to re-open this thread by changing the Topic Status to ‘Not 
   Resolved’ if any other questions come up and we’d be happy to help. 🙂
 * Regards,

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Content restriction shortcode not working’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/content-restriction-shortcode-not-working/#post-15187762)
 * Status: resolved