cat_ID] = $category_list->cat_name; } $wp_cats = array(-1=>"Choose a category") + $wp_cats; $options = array ( array( "name" => $themename." Options", "type" => "title"), array( "name" => "General", "type" => "section"), array( "type" => "open"), array( "name" => "Custom Favicon", "desc" => "A favicon is a 16x16 pixel icon that represents your site; paste the URL to a .ico image that you want to use as the image", "id" => $shortname."_favicon", "type" => "text", "std" => home_url() ."/favicon.ico"), array( "name" => "Colour Scheme", "desc" => "Select the colour scheme for the theme", "id" => $shortname."_color_scheme", "type" => "select", "options" => array("green" => "Green", "blue" => "Blue", "red" => "Red", "orange" => "Orange", "purple" => "Purple"), "std" => "green"), array( "name" => "Home featured category", "desc" => "Select the category that you want to be used in the homepage slider", "id" => $shortname."_featured_category", "type" => "select", "options" => $wp_cats), array( "name" => "Logo URL", "desc" => "Enter the link to your logo image", "id" => $shortname."_logo", "type" => "text", "std" => ""), array( "name" => "Show post excepts on homepage", "desc" => "Do you want to show excerpts on homepage instead of full posts?", "id" => $shortname."_show_excerpts", "value" => "0", "type" => "checkbox"), array( "name" => "Custom CSS", "desc" => "Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}", "id" => $shortname."_custom_css", "type" => "textarea", "std" => ""), array( "type" => "close"), array( "name" => "Social Tools", "type" => "section"), array( "type" => "open"), array( "name" => "Twitter URL", "desc" => "Enter the URL of your Twitter page.", "id" => $shortname."_twitter_url", "type" => "text", "std" => ""), array( "name" => "Facebook URL", "desc" => "Enter the URL of your Facebook fan page.", "id" => $shortname."_fb_url", "type" => "text", "std" => ""), array( "name" => "Google Plus URL", "desc" => "Enter the URL of your Google page.", "id" => $shortname."_google_plus_url", "type" => "text", "std" => ""), array( "name" => "Feedburner URL", "desc" => "Feedburner is a Google service that takes care of your RSS feed. Paste your Feedburner URL here to let readers see it in your website", "id" => $shortname."_feedburner", "type" => "text", "std" => get_bloginfo('rss2_url')), array( "type" => "close"), array( "name" => "Footer", "type" => "section"), array( "type" => "open"), array( "name" => "Footer copyright text", "desc" => "Enter text used in the right side of the footer. It can be HTML", "id" => $shortname."_footer_text", "type" => "text", "std" => "© ".date('Y')." ".get_bloginfo('name')), array( "name" => "Hide credit link?", "desc" => "Do you want to hide the credit link in footer?", "id" => $shortname."_hide_credits", "value" => "1", "type" => "checkbox"), array( "type" => "close") ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( isset($_GET['page']) && $_GET['page'] == basename(__FILE__) ) { if ( isset($_POST) && array_key_exists('action', $_POST) && 'save' == $_POST['action'] ) { foreach ($options as $value) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } } header("Location: admin.php?page=options-panel.php&saved=true"); die; } else if( isset($_REQUEST['action']) && 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); } header("Location: admin.php?page=options-panel.php&reset=true"); die; } } add_theme_page($themename, $themename.' Settings', 'administrator', basename(__FILE__), 'mytheme_admin'); } function mytheme_add_init() { $file_dir = get_template_directory_uri(); wp_enqueue_style("options_panel_stylesheet", $file_dir."/library/css/options-panel.css", false, "1.0", "all"); wp_enqueue_script("options_panel_script", $file_dir."/library/js/options-panel.js", false, "1.0"); } function mytheme_admin() { global $themename, $shortname, $options; $i=0; if ( isset($_REQUEST['saved']) ) echo '

'.$themename.' settings saved.

'; if ( isset($_REQUEST['reset']) ) echo '

'.$themename.' settings reset.

'; ?>

Settings


To easily use the theme, you can use the menu below.

" />
/>