Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.