Title: Custom capabilities &amp; url redirection
Last modified: August 22, 2016

---

# Custom capabilities & url redirection

 *  [neint](https://wordpress.org/support/users/neint/)
 * (@neint)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/custom-capabilities-url-redirection/)
 * There seems to be a bug in using custom capabilities and url redirection together.
 * When a user logs in, I want the site to redirect them to their own welcome page,
   which is protected using custom capabilities.
 * For example, somebody with the username “john”, was custom capability “john”.
   I created a page with the slug /john-reports/ and set “john” to be a required
   custom capability for the page.
 * I set the special redirection link to be: [http://www.intelligo-group.com/%%current_user_nicename%%-reports](http://www.intelligo-group.com/%%current_user_nicename%%-reports)
 * When the person logs in, they get redirected to the Membership options page instead
   of their welcome page. If I type in [http://www.intelligo-group.com/john-reports](http://www.intelligo-group.com/john-reports)
   after they’re logged in, it goes to the correct page. Therefore the custom capabilities
   is working.
 * If I delete the custom capability from the john-reports page, the redirect works
   upon login, therefore the redirect is working.
 * However, together it is not working. How can we fix this?
    Thanks Nadav
 * Note: Setting [http://www.intelligo-group.com/%%current_user_ccaps%%](http://www.intelligo-group.com/%%current_user_ccaps%%)
   will actually redirect successfully to /john-reports/ though I don’t understand
   how it knows to go to that page. What if I have another page with the custom 
   capability “john”? And if I want to give a person a second custom capability,
   it tries to redirect to a url containing both CCs. Not a good / reliable solution.
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

The topic ‘Custom capabilities & url redirection’ 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/)

 * 0 replies
 * 1 participant
 * Last reply from: [neint](https://wordpress.org/support/users/neint/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/custom-capabilities-url-redirection/)
 * Status: not resolved