UpThemes WordPress Theme Options Framework
Blog 0 CommentsRemember the days when you were searching like crazy for tutorials on how to create a WordPress theme options page and barely found a couple of sites with good examples? I hated those days.
Luckily, more and more people are embracing open source (and GPL since we’re talking WordPress).
Now, another big name in the WordPress theming industry steps up and brings an awesome contribution to the table. I’m talking about UpThemes, who have released their own options framework as a public project on Github.
The framework is 100% GPL, just like WordPress. And the best part is that everyone can contribute to creating a rock-solid WordPress theme options framework.
Here are some features:
- Image Management
Upload and resize logos and background images with ease! - Import/Export Options
Save your theme options and transfer them to another site. - Edit Fonts & Text Styles
Our custom font manager puts you in control. - SEO Management
Control titles, keywords, and descriptions on every page, category, and post. - Change Color Schemes
Switch between multiple color schemes for most themes. - It’s Open Source
Integrate the UpThemes Framework into your own themes in 5 minutes. Seriously.
UpThemes Framework Typography Panel Screencast
Implementation Instructions
- Grab the latest stable release of the UpThemes Framework from the /tags/ folder.
- Drop the /admin/ and /theme-options/ folders into your theme folder.
- Add the following line to your functions.php file:
require_once('admin/admin.php'); // bootstrap the UpThemes Framework - Copy /admin/options-tab-sample.txt to your /theme-options/ folder and name it something like general-options_1.php
NOTE ON NAMING OPTIONS FILES: Each theme options file will create a new tab in your theme options panel. As shown in the name “general-options_1.php” the name of each file is very important in naming the tab as well as setting the order of the tabs. The 1 at the end of the filename is what tells the UpThemes Framework what order to show the tab in. Make sure to separate words in a name of a tab by using dashes (-) and separate the words from the order by using underscores(_). The underscore separates the tab name from the order number of each tab file. I know it sounds confusing, but trust me, it makes your life easier later when you’re building out new tabs.
- Within each tab file, you need to define your options. At the top of each file is a list of options and you should start off with an example of how the array should be structured. Follow that structure and you should be golden.
- Once you’ve created all your theme options, you need to call the global variable $up_options wherever you plan to use them, like so:
function my_theme_logo(){ global $up_options; ?> <a href="http://mywebsite.com"><img src="<?php echo $up_options->theme_logo; ?>"></a> <?php } ?>You simply declare the global
$up_optionsand then use the id of the theme option you created previously and echo$up_options->theme_logo - Have fun! For more advanced examples, download some themes from UpThemes and take a peek under the hood.

