Skip to content

Instantly share code, notes, and snippets.

@aligator28
Forked from kharissulistiyo/admin-redirect.php
Created February 11, 2017 08:56
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 aligator28/f5a22fc414482e9f807e096ce6133072 to your computer and use it in GitHub Desktop.
Save aligator28/f5a22fc414482e9f807e096ce6133072 to your computer and use it in GitHub Desktop.
Admin Page Redirection After WordPress Theme Activated
/**
* WordPress snippet
* Admin page redirection
* Put this inside theme setup function
*/
global $pagenow;
if ( is_admin() && 'themes.php' == $pagenow && isset( $_GET['activated'] ) ) {
wp_redirect(admin_url("themes.php?page=rundown-settings")); // Your admin page URL
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment