I am planning to have a page restriction and redirect for the particular level of users, but I dont have any idea how to implement that. Here's an example of what I want to achieve

I have a page lets say for example "News" page, and I want it to be accessible for all Gold Members. If Silver users tried to access it. they should be redirected to any page where I wanted them to be redirected. Is this possible. I almost forgot to mention, I am using WishlistMembership Plugin.. I already asked some support from Wishlist but no reply so far.

4 Answers 4


I searched the documentation for WishListMember and they offer no hooks to do what you are suggesting. Have you tried a different membership system? I would suggest one of these 2 depending on your needs. Specifically, I know I have seen "redirection" in MagicMember but I believe the redirection is for where members land after login. MagicMember has great support though, you can just ask them what the hook is for "non-member access redirection.



Alternatively, depending on your plugin, you could extend the plugin from your themes functions.php file. The plugin loads first though, so its still really dependent on how the plugin redirects people away from protect pages. Unfortunately not all these plugins are not open source and available for code browsing so its not possible for us to give you any code insight with no access to the plugin code.


I'd suggest:

  1. Setting a Custom Field within a Custom Meta Box where you can mark the pages 'Gold', 'Silver', etc.

  2. In the page template, check for the user capability and the page "permissions".

  3. If they don't match, redirect or display "Forbidden content".

Probably point 2 can be done with an action hook, but am not sure which one would be the earliest where you can check for the page values and the user info.

  • Thanks, I tried this code <?php if (is_user_logged_in()) { wp_redirect( 'http://www.example.com'); exit; } else { //do-nothing} ?> sir, i tried this one as practice but not working. Did I missed something??
    – markyeoj
    Commented Dec 10, 2012 at 14:03
  • Without seeing the context, it's hard to tell. At first, seems legit.
    – brasofilo
    Commented Dec 10, 2012 at 14:32
  • its not redirecting me to other page. instead, the area where I put the code ends with a white blank area at the front end.
    – markyeoj
    Commented Dec 10, 2012 at 17:07
  • Please, add more details to the Question itself.
    – brasofilo
    Commented Dec 10, 2012 at 17:11

This is now built into WishList Member. You can specify "error" pages for individual posts/pages. Here's a screenshot:


You'd want to set your Non-Member and Wrong Member error pages accordingly.


I know it's a late reply.

You can use the [All In One Content Restriction] https://wordpress.org/plugins/all-in-one-content-restriction/ WordPress plugin, It will help you to achieve any type of restriction. and it's regularly improving its features.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – cjbj
    Commented Oct 6, 2022 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.