[resolved] How do I completely exclude non administrator users from the backend? (4 posts)

  1. sghod1212
    Posted 7 years ago #

    I have a site where I've set up administrator and author accounts for people who will be writing on the site, but I also have a general registration page for the public to create subscriber accounts. However, I don't want these subscriber accounts to even see the backend of WordPress, but if a subscriber user goes to http://mysite.com/wp-admin/ the user is automatically redirected to the backend after logging in. How do I prevent subscribers from seeing the backend?

  2. asfodel
    Posted 7 years ago #

    I think this plugin will work for what you need:

    I haven't used it myself so I'm not entirely sure.

  3. sghod1212
    Posted 7 years ago #

    I don't think that's quite what I'm looking for. I just want to get the url and if it contains the string "wp-admin" and the current user is not one of the 3 that are trusted, then I want the page to redirect to the homepage. I know I can take care of this in less than 3 lines of code in an if statement, but I'm not sure where to put it.

  4. sghod1212
    Posted 7 years ago #


    That's exactly what I was looking for^

    There are also some other options listed in this thread:


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.