Title: Exclude Role in Shortcode?
Last modified: January 26, 2017

---

# Exclude Role in Shortcode?

 *  Resolved [L O Lawson](https://wordpress.org/support/users/l-o-lawson/)
 * (@l-o-lawson)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/)
 * I have hierarchical user roles. In most places on my site hierarchical permissions
   is perfect, but in a few places on my site I’d like to exclude higher level roles
   from viewing sections of content on pages–content that is available to lower 
   levels.
 * For example, if I have the hierarchical roles
    Highest Role Middle Role Lowest
   Role
 * Is there short code option that would explicitly allow the lowest and highest
   role, but exclude the middle?

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

 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8788154)
 * Unfortunately that is not currently possible with the shortcode, but it is a 
   good idea. Can I ask you some more about your use case, so I can figure out the
   best way to implement this feature?
 *  Thread Starter [L O Lawson](https://wordpress.org/support/users/l-o-lawson/)
 * (@l-o-lawson)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8794882)
 * I have a page that I want to be viewed by hierarchical Levels 1-5. However, there
   is a section of the page that I don’t want to be visible to Level 3. I’d like
   to be able to use the shortcode on that section to block level 3, perhaps like
 *     ```
        Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
   
       [restrict role="-level3"] Suspendisse id dui malesuada felis imperdiet mollis sit amet vitae eros.  [/restrict]
   
       Praesent lobortis tellus non lacus congue laoreet.
       ```
   
    -  This reply was modified 9 years, 4 months ago by [L O Lawson](https://wordpress.org/support/users/l-o-lawson/).
 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8804550)
 * That makes sense. Just to be clear, when you say hierarchical levels, do you 
   refer to the Access Levels created by the plugin, or the Roles that is part of
   WordPress (and that you can synchronize to a level)?
 *  Thread Starter [L O Lawson](https://wordpress.org/support/users/l-o-lawson/)
 * (@l-o-lawson)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8804768)
 * Either, but I actually intended to ask about Access Levels.
 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8859604)
 * I have noted this feature on the roadmap, so it will be included in the plugin,
   but unfortunately I cannot give an ETA.

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

The topic ‘Exclude Role in Shortcode?’ is closed to new replies.

 * ![](https://ps.w.org/restrict-user-access/assets/icon-256x256.png?rev=1815922)
 * [Restrict User Access - Ultimate Membership & Content Protection](https://wordpress.org/plugins/restrict-user-access/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-user-access/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-user-access/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-user-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-user-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-user-access/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/exclude-role-in-shortcode/#post-8859604)
 * Status: resolved