"Number of Columns", "id" => $shortname."columns", "type" => "radio", "before" => "", "after" => "Choose wheter the theme shall display one or two columns.", "std" => "2", "options" => array("2", "1")), array( "name" => "Color scheme", "id" => $shortname."color", "type" => "radio", "before" => "", "after" => "Choose the color scheme for your blog.", "std" => "white", "options" => array("white", "black")), array( "name" => "Display the number of posts in brackets for each category", "id" => $shortname."categorycount", "type" => "radio", "before" => "", "after" => "You have to change two lines in a WordPress core file for a correct result => Check out the instruction in the readme.txt file in the theme directory.", "std" => "No", "options" => array("Yes", "No")), array( "name" => "Display the number of posts in brackets for archives", "id" => $shortname."archivescount", "type" => "radio", "before" => "", "after" => "You have to change two lines in a WordPress core file for a correct result => Check out the instruction in the readme.txt file in the theme directory.", "std" => "No", "options" => array("Yes", "No")), array( "name" => "Show edit post link", "id" => $shortname."editpostlink", "type" => "radio", "before" => "", "after" => "Choose wheter to show or hide the 'edit post' link at the top of each post.", "std" => "No", "options" => array("No", "Yes")), array( "name" => "Number of random header pictures", "id" => $shortname."headerpics", "type" => "text", "before" => "", "after" => "If you have not uploaded as many pictures there will sometimes be a blank area instead.", "std" => "3"), array( "name" => "Archive type", "id" => $shortname."archivestype", "type" => "select", "before" => "", "after" => "Choose the type of the archive.", "std" => "monthly", "options" => array("yearly", "monthly", "weekly", "daily", "postbypost")), array( "name" => "Number of posts to be listed in 'Latest posts'", "id" => $shortname."latestpostslimit", "type" => "text", "before" => "", "after" => "Choose the number of posts that shall be listed in the dropdown menu 'Latest posts'.", "std" => "5"), array( "name" => "Header images path", "id" => $shortname."headerimagespath", "type" => "text", "before" => "", "after" => "Choose the directory for the header images.", "std" => "wp-content/themes/an-an-ordinary-theme/images") /*array( "name" => "Textarea", "id" => $shortname."_bigger_box", "std" => "Default Text", "type" => "textarea"), array( "name" => "Dropdown Selection Menu", "id" => $shortname."_dropdown_menu", "type" => "select", "std" => "Default", "options" => array("Default", "Option 1", "Option 2"))*/ ); function mytheme_add_admin() { global $themename, $shortname, $options; if ( $_GET['page'] == basename(__FILE__) ) { if ( 'save' == $_REQUEST['action'] ) { foreach ($options as $value) { update_option( $value['id'], addslashes(htmlentities($_REQUEST[ $value['id'] ] ))); } foreach ($options as $value) { if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], addslashes(htmlentities($_REQUEST[ $value['id'] ] ))); } else { delete_option( $value['id'] ); } } header("Location: themes.php?page=controlpanel.php&saved=true"); die; } else if( 'reset' == $_REQUEST['action'] ) { foreach ($options as $value) { delete_option( $value['id'] ); update_option( $value['id'], $value['std'] ); } header("Location: themes.php?page=controlpanel.php&reset=true"); die; } } add_theme_page("options for ".$themename, "an ordinary theme", 'edit_themes', basename(__FILE__), 'mytheme_admin'); } function mytheme_admin() { global $themename, $shortname, $options; if ( $_REQUEST['saved'] ) echo '
'.$themename.' settings saved.
'.$themename.' settings reset.
Theme Name: an ordinary theme
Theme URI: http://www.blog.ordinary.ch/?page_id=269
Description: A simple theme with two corresponding random pictures in the header and a suckertree navigation thereunder. Optionally one or two columns. Two color schemes available. Widget ready. Please read the readme.txt file.
Author: Fabian Schmid
Author URI: http://www.blog.ordinary.ch
Version: 2.7.1
Tags: black, white, light, one-column, two-columns, fixed-width, custom-header, custom-background, translation-ready, microformats, rtl-language-support, editor-style
License: GNU GENERAL PUBLIC LICENSE
License URI:
First of all, thank you for using 'an ordinary theme' in your blog. Visit
my blog
for further information about the theme and me. Don't hesitate to ask, if you've got questions about the theme.
'an ordinary theme' is continuously being refined and updated.
It is published as an open source theme. You are free to change what ever you like. Of course I'd be happy about you leaving the link to my blog in the footer.
There are several things you cannot change in the admin section. The most common of them might be the following:
Change log
* Version 2.7.1 (20.12.2010)
Revised code structure
Adjusted code to WP theme requirements
Code cosmetics
* Version 2.7 (15.12.2010)
Added setting to change the header images path
Added setting to display the number of posts for archives
Code cosmetics
* Version 2.6 (22.12.2009)
Code cosmetics
* Version 2.5 (02.07.2009)
Removed duplicate comment form in single view
Ordered attributes in Stylesheet alphabetically
Removed alt attribute for links in footer due to xhtml validity
* Version 2.4 (11.06.2009)
Added WP styles for wrapping text around images (http://codex.wordpress.org/Wrapping_Text_Around_Images)
* Version 2.3 (24.04.2009)
Fixed search engine problems
Fixed navigation problems in IE<7
Reduced margins and paddings for ul and ol in entries
Stylesheet cosmetics
* Version 2.2 (08.04.2009)
Corrected category bug in sidebar
Corrected some typing errors
Added theme name and version to the footer
* Version 2.1 (07.04.2009)
Added a couple of settings to the admin panel
Improved the html and css structure
Reorganized the file structure
* Version 2.0 (16.03.2009)
Improved the html structure
* Version 1.9 (13.03.2009)
Fixed some tiny imperfections
* Version 1.8 (12.02.2009)
Increased the font size in entries
Altered the font family in entries
Added some additional font family stlyes if default font isn't available
Lit the 'add comment' button
* Version 1.7 (05.02.2009)
Removed the border for image links
Altered index.php, single.php and search.php for code cosmetics
* Version 1.6 (29.01.2009)
Removed the post counting for each category in brackets due to necessary changes in wp core files
Added an instruction for readding the post counting for categories in brackets
Lit the alternating comments background color
* Version 1.5 (24.01.2009)
Added min-height for overall div #contentwrap
Added important notice to readme
Altered header.php for 404 error page reasons
* Version 1.4 (23.01.2009)
Altered comments.php for style reasons
* Version 1.3 (19.01.2009)
Altered footer for copyright reasons
Removed non-existent images
Adjusted theme tags
* Version 1.2 (15.01.2009)
Altered style.css for style reasons
* Version 1.1 (10.01.2009)
Altered style.css for style reasons
* Version 1.0 (12.12.2008)
Initial version
Thanks to...