• Hi, which hook runs when I activate a new theme?

    I just updated to WP 3.03 and while I was using “register_activation_hook” before, it doesn’t seem to be working anymore ( or maybe it never did? ).

    I’m trying to add some default options to the options table when my theme is activated.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter uglymunky

    (@uglymunky)

    I was looking at this page:

    http://codex.wordpress.org/Plugin_API/Action_Reference

    Which lists the different hooks but still can’t figure out wich one to use. I tried “setup_theme” but no go.

    dunno if this helps….

    //Redirect to theme options page on activation
    if ( is_admin() && isset($_GET['activated'] ) && $pagenow ==	"themes.php" )
    	wp_redirect( 'themes.php?page=voodoo_options' );

    I use this to redirect to my theme option page on theme activation, which then saves my options….

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to hook when a theme is activated’ is closed to new replies.