Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Logged in Home Page Redirect
* Logged in Home Page Redirect
add_action( 'template_redirect', 'pu01_logged_in_homepage' );
// Redirect logged in users from home page to admin
function pu01_logged_in_homepage() {
if ( is_user_logged_in() && is_home() )
wp_redirect( admin_url(), 307 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.