Support » Themes and Templates » [Resolved] Adding an admin message on theme install
6 years, 1 month ago
OK, my google fu is weak on this one.
Trying to learn here more than anything as I don’t plan on releasing this theme to the public…. but I’d still like to know
When my theme is installed, the user would need to visit the theme options page once to set the default option values in place.
How do I have an admin message appear when the theme is activated saying just that? preferably with a link to the theme options page.
Gold star for making the message go away once the page is visited
Probably not the answer you want, but what about just going to the options page like this theme:
When the theme installs, it automatically heads over to the options page? If so…that would definitely work fine for me
Heh…no kidding! That definitely worked! Thanks for pointing me in the right direction
//Redirect to theme options page on activation
if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
wp_redirect( 'themes.php?page=theme_options_page' );
is the bit of code in case anyone else is looking. Where theme_options_page is your actual options page slug
yeah, take a look. Of course I don’t know how it’s done …
[oops didn’t see your last message before posting this]