WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently using a plugin called Sidebar Login which allows users to bypass the dashboard and go directly to the site. However, when users login via /wp-login.php (e.g. when they click on their verification links in their emails), they are once again sent to the dashboard. I would like for users to be able to click on their verification links and have them directed to the home page of the website where they can sign in through the sidebar login I have set up. Is this possible?

share|improve this question
up vote 1 down vote accepted

You can achieve this by using the Plugin Peter's Login Redirect. It allows you to send users to a specific page after login, based on the user capabilities. So you can allow administrators to go to the admin section, while members are redirected to the front page.

If you want to prevent users from ever seeing the admin, insert something like this to your functions.php, depending on which users you want to allow in the admin you may have to change the capability.

if ( is_admin() && !current_user_can('manage_options') ) {
    wp_redirect( get_bloginfo( 'url' ) );

You can also hook a redirect function to login_enqueue_scripts, to send every user calling the login page to the homepage (same structure as above).

share|improve this answer
Thanks, the plugin + function did the job. I entered the homepage url and now it redirects all users trying to login via /wp-login.php to the home page instead of the admin screen. Thank you! – Desi Jan 17 '13 at 21:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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