I'm making a Theme Options page for the admin. How can I create default settings for my options?
I'm making a Theme Options page for the admin. How can I create default settings for my options?
Figured it out:
if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) {
add_option( $optname, $optval );
}
This will add an option when the theme is activated.
This topic has been closed to new replies.