Forums

Default Options for Theme Options Page (2 posts)

  1. freshifreshy
    Member
    Posted 2 years ago #

    I'm making a Theme Options page for the admin. How can I create default settings for my options?

  2. freshifreshy
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic