WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding an admin message on theme install (5 posts)

  1. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years 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

    Thanks peeps!

  2. MichaelH
    Member
    Posted 3 years ago #

    Probably not the answer you want, but what about just going to the options page like this theme:
    http://wordpress.org/extend/themes/vigilance

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    When the theme installs, it automatically heads over to the options page? If so...that would definitely work fine for me

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 3 years ago #

    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

  5. MichaelH
    Member
    Posted 3 years ago #

    yeah, take a look. Of course I don't know how it's done ...

    [oops didn't see your last message before posting this]

Topic Closed

This topic has been closed to new replies.

About this Topic