,

Announcing the Base Theme Framework for WordPress

Base WordPress Theme
Base WordPress Theme
Base WordPress Theme

Today we are happy to release our latest paid theme, Base, into the wild. Base is a minimally-styled, feature rich, theme framework built specifically to power child themes. It includes an application framework, a theme options framework and support for all the latest and greatest WordPress features.

This release marks a significant milestone in our theme development and it has been guided by these goals: To bring our customers more themes, quicker and make theme upgrades a breeze.  Two child themes, Uno and Sidewinder, will be released in the coming days that will show the flexibility and versatility of the Base theme framework.

Development Philosophy

  • Build less, not more – Base includes all the functions and options that are universally required in all child themes, and nothing more.  All child-specific features, options and apps will be loaded individually in child themes or via plugins.
  • Children are the future – The future of WordPress theming revolves around child themes.  Child themes inherit all the features of a parent theme (Base) but can dramatically alter the design and functionality of the parent theme.
  • Customization is encouraged – Hooks and filters are used throughout Base so users and developers can customize, without modifying any code in the original Base template files.  Plus, your additions will be safe from any Base upgrades.  Hooks and filters are fully documented here and here.

Built To Power Child Themes

Base was built specifically with child theming in mind.  A Base child theme might merely consist of a stylesheet (style.css) and a functions file (functions.php) containing hooks.  Base’s unique approach to apps, theme options and hooks simplifies and streamlines the process of child theme development so we can bring you more themes, faster.

Application Framework

One of the most unique features in Base is the application framework.  New applications such as a Slideshow, Slider or Category Columns have become transportable, self-contained “apps” that can be loaded either directly inside child themes or via plugins.  Certain child themes will contain certain apps and these apps can be easily transported into other child themes or a new child theme that you create.  All apps contain theme options and can be sorted with a simple drag-drop interface to create the design you desire.

Theme Options Framework

Creating theme options is the most difficult part of theme development.  More options means more code.  More code means more complexities.  More complexities means it takes us longer to develop new themes.  Our goal with Base was to create efficiencies in how theme options are created and modified in child themes.  Using filter hooks, adding new options to either Base or a Base child theme is very simple.  For example, the following snippet could be added in your functions.php file of a child theme to add more theme options to control design elements contained in a child theme:

<?php

global $gpp_base_child_options, $hello;
if(!isset($hello)) {$hello = "false" ;}
$shortname = "gpp_base";

$options = array();

$options[] = array(	"name" => "Hello",
					"type" => "heading");

$options[] = array(	"name" => "Turn on",
					"desc" => "Check this to show a hello message on the homepage.",
					"id" => $shortname."_hello",
					"std" => $hello,
					"type" => "checkbox");

$options[] = array(	"name" => "Hello Message",
					"desc" => "Enter your hello message",
					"id" => $shortname."_hello_message",
					"std" => "",
					"type" => "textarea",
					"pid" => $shortname."_hello pid");

$options[] = array( "name" => "Hello Category" ,
					"desc" => "",
					"id" => $shortname."_hello_cat",
					"std" => "",
					"type" => "select",
					"options" => $categories,
					"pid" => $shortname."_hello pid");

$gpp_base_child_options = array_merge($gpp_base_child_options,$options);
?>

In the code above, we’ve essentially add three things to the theme options page:

  1. A new option section called Hello
  2. A new checkbox option to show or hide the Hello message
  3. A new textarea field for the hello message. This option is only shown if the Hello checkbox is checked. The option dependency is specified using this:
    "pid" => $shortname."_hello pid");
  4. A select box containing a list of all categories used in your site. This option is only shown if the Hello checkbox is checked. The option dependency is specified using this:
    "pid" => $shortname."_hello pid");

Now that we have added some new options, lets check these options and then do some stuff if the option is turned on:

<?php

function gpp_base_slider_include() {
	global $gpp;
	$hello_cat_ID = get_option('gpp_base_hello_cat');
	$hello_cat = get_cat_name($hello_cat_ID);

	echo 'Hello is turned on!';
        if($gpp['gpp_base_hello_message'] <> ""){
            echo stripslashes(stripslashes($gpp['gpp_base_hello_message']));
        } else {
            _e('You haven't entered a hello message');
        }
	echo 'The Hello category is '.$slider_cat_ID;

}

if((isset($gpp['gpp_base_slider']) && $gpp['gpp_base_slider']=='true') || $gpp === FALSE) {
	add_action('gpp_base_apps', 'gpp_base_slider_include');
}

?>

Don’t worry if the above code seems intimidating; it’s primarily for WordPress developers. We’re doing this stuff for you in our child themes.

Action Hooks & Filter Hooks

This section will probably only be useful for theme developers, but it should give all readers a better idea as to why we refer to Base as a theme framework built specifically for powering child themes.

  • Action hooks are essentially placeholders in themes. Wherever an action hook is placed, it will execute any code that has been “hooked” to it.
  • Filter hooks allow us to filter theme functions, without modifying any of the Base theme code.

View the documentation on the hooks used in Base.

When added to child themes, hooks provide theme developers with ways to dramatically change the design and functionality of parent themes (Base).  A child theme might merely consist of a stylesheet (style.css) and a functions file (functions.php) containing hooks.

Support For Latest WordPress Features

Base support these features, plus many more, in WordPress (currently at version 3.0.3 at the time of this posting):

  • Post Formats – Post formats allow us to customize the presentation of a post, based on the user-defined format (photo gallery, video, quote, blog).  This is similar to how Tumblr works.  This feature will be made available when WordPress 3.1 drops (due mid to late December 2010).
  • Custom Post Types – Custom post types allow users to easily create and manage such things as portfolios, videos, workshops and whatever else a user or developer can imagine.  All custom post types will be added via plugins, which we will soon make available as free plugins.
  • Custom Headers – Custom headers allow users to easily choose, upload or remove header images from your WordPress theme.  You can add your own custom header in Base by visiting your Appearance -> Header tab.
  • Custom Menus – Custom menus allow users to easily control the navigation menu, without touching a single line of code.  You can add your own custom menu in Base by visiting your Appearance -> Menu tab.
  • Custom Backgrounds – Custom backgrounds allow users to easily change backgrounds in your WordPress theme.  You can add your own custom background in Base by visiting your Appearance -> Background tab.
  • Post Thumbnails – A post thumbnail is an image that is chosen as the representative image for Posts, Pages or Custom Post Types. You can select your own post thumbnail by setting a featured image for each post, page or custom post type.

10 responses to “Announcing the Base Theme Framework for WordPress”

  1. Edward Caissie Avatar

    Great to read this announcement. I’ve been looking forward to this theme’s release!

    1. Graph Paper Press Avatar

      Thanks for your help with testing & debugging, Ed! You are a serious WordPress theme standards ninja!

  2. xaxa Avatar
    xaxa

    Perfect timing. I am very eager to delve into this now. However, the documentation link still points to a local (file:///Users/thadallender/Sites/localhost/wp3.1/wp-content/themes/base/documentation.html).

    1. Graph Paper Press Avatar

      Just fixed the link in the post 😉

  3. washy Avatar
    washy

    Hi Everyone

    Is there any timescale in place for when one or more BASE Child Themes will be released.

    Cheers

    1. Graph Paper Press Avatar

      Hi Washy,

      We plan to release Uno next week. It’s a one-column photo slideshow/photo blogging template. Our goal is to create one child theme every two weeks.

      1. Washy Avatar
        Washy

        Brilliant – can’t wait – thanks for the reply.

  4. Eblunn Avatar
    Eblunn

    Will this become an integrated theme with Photoshelter?

  5. Steph Avatar
    Steph

    Thanks guys! So great to see these new themes and am loving Base already. You mentioned Sidewinder would be released soon. Any idea when this will be coming? Very interested in seeing it!

    Thanks again for all your hard work! Happy New Year!

  6. David Avatar
    David

    If you develop a premium theme off the base theme can you sell it on sites like themeforest.net ?  And if your GPL allows that, would you need to change the functions names to something other than “base” ?   Im looking for base themes that I can use while developing premium themes, any advice on that ?

Leave a Reply

Your email address will not be published. Required fields are marked *