redirect users to front page after login
function redirect_to_front_page() { global $redirect_to; if ( !isset( $_GET['redirect_to'] ) ) { $redirect_to = get_option( 'siteurl' ); } } add_action('login_form', 'redirect_to_front_page');