Title: Widget Logic by custom capabilities
Last modified: August 21, 2016

---

# Widget Logic by custom capabilities

 *  Resolved [familylawboard](https://wordpress.org/support/users/familylawboard/)
 * (@familylawboard)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/widget-logic-by-custom-capabilities/)
 * I’m new to using Widget Logic to control which widgets show up in the sidebar
   on a site with s2member. What I’m really trying to do is get a calendar widget
   to show up based on my users’ geographic location (I have these set up as ccaps).
   I’ve tried this in the Widget Logic box, but it’s apparently not that simple:
 *     ```
       <?php if(current_user_can("access_s2member_ccap_colorado")){ ?>
           <?php } ?>
       ```
   
 * Anyone know what I’m doing wrong here?
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

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

 *  [Cristián Lávaque](https://wordpress.org/support/users/anguz/)
 * (@anguz)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/widget-logic-by-custom-capabilities/#post-4918643)
 * From their screenshot it looks like you’d enter the expression directly, without
   the PHP tags, if or other things, just:
 * `current_user_can('access_s2member_ccap_colorado')`
 * I hope that helps. 🙂
 *  Thread Starter [familylawboard](https://wordpress.org/support/users/familylawboard/)
 * (@familylawboard)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/widget-logic-by-custom-capabilities/#post-4918646)
 * That was it. Thanks!
 *  [Cristián Lávaque](https://wordpress.org/support/users/anguz/)
 * (@anguz)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/widget-logic-by-custom-capabilities/#post-4918649)
 * Great 🙂

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

The topic ‘Widget Logic by custom capabilities’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Cristián Lávaque](https://wordpress.org/support/users/anguz/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/widget-logic-by-custom-capabilities/#post-4918649)
 * Status: resolved