Created
November 14, 2013 19:46
-
-
Save jeffsebring/7473138 to your computer and use it in GitHub Desktop.
Logged in Home Page Redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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