Title: Custom rules not working
Last modified: January 17, 2023

---

# Custom rules not working

 *  Resolved [jeckyl](https://wordpress.org/support/users/jeckyl/)
 * (@jeckyl)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/custom-rules-not-working/)
 * This is the current code of a test page:
 * [content_control roles=”Users-A,Administrator,Users-B” message=”You don’t have
   access to this.”]
 * Any logged in user can see this
 * [/content_control]
 * [content_control roles=”Users-A” message=”You are not a User-A.”]
 * Only Users-A can see this
 * [/content_control]
 * [content_control roles=”Administrator” message=”You are not an Admin.”]
 * Only Administrators can see this 😉
 * [/content_control]
 * [content_control roles=”Users-B” message=”You are not a User-B.”]
 * Only Users-B can see this.
 * [/content_control]
 * [content_control message=”You are an idot”]
 * You are logged in and can see this
 * [/content_control]
 * Logged in as an Administrator, this is what I get:
 * You don’t have access to this.
 * You are not a User-A.
 * You are not an Admin.
 * You are not a User-B.
 * You are logged in and can see this
 * So using the shortcode with out any rules, I can see the content (expected), 
   but the rule for just Administrators fails – testing the other roles, I get the
   same results.

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

 *  Plugin Support [Kim L](https://wordpress.org/support/users/kimmyx/)
 * (@kimmyx)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/custom-rules-not-working/#post-16393381)
 * Hi [@jeckyl](https://wordpress.org/support/users/jeckyl/) ,
 * Apologies for the delay in response.
 * For the `roles` parameter, makes sure to type out the roles using all lowercase.
 * For example:
 *     ```wp-block-code
       [content_control roles="administrator" message="You are not an Admin."]
   
       Only Administrators can see this 😉</img>
   
       [/content_control]
       ```
   
 * Here’s a demo of the difference: [https://share.getcloudapp.com/d5uyJ6Gk](https://share.getcloudapp.com/d5uyJ6Gk)
 * Hope this helps! Let us know if you have more questions. 🙂
 *  Thread Starter [jeckyl](https://wordpress.org/support/users/jeckyl/)
 * (@jeckyl)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/custom-rules-not-working/#post-16393571)
 * Thank you so much – I made the changes, and it does work!

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

The topic ‘Custom rules not working’ is closed to new replies.

 * ![](https://ps.w.org/content-control/assets/icon-256x256.gif?rev=2968535)
 * [Content Control - The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More](https://wordpress.org/plugins/content-control/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-control/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-control/)
 * [Active Topics](https://wordpress.org/support/plugin/content-control/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-control/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-control/reviews/)

## Tags

 * [rules](https://wordpress.org/support/topic-tag/rules/)

 * 2 replies
 * 2 participants
 * Last reply from: [jeckyl](https://wordpress.org/support/users/jeckyl/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/custom-rules-not-working/#post-16393571)
 * Status: resolved