Skip to content

Instantly share code, notes, and snippets.

@jeffsebring
Created November 14, 2013 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffsebring/7473138 to your computer and use it in GitHub Desktop.
Save jeffsebring/7473138 to your computer and use it in GitHub Desktop.
Logged in Home Page Redirect
<?php
/**
* 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