themekit_beta

ThemeKit For WordPress Beta Release

| WordPress | Leave a comment

ThemeKit is what I have been using to build and modify WordPress themes. It is not a full theme framework like Genesis but is a high-powered option creator and a perfect complement to the Genesis framework. ThemeKit is usable with almost any theme framework and can be set up to run in either a parent or child theme with ease.

This is a basic example of how the settings screen created by ThemeKit looks. ThemeKit comes with many of the controls you would want to add prebuilt for you, from a basic textbox to a font/color/size selector with Google font support.

Below is a piece of the code used in the Cadet WordPress theme. As you can see it uses a format that is fairly standard for creating options. One of the features that a lot of other option creators don’t include is the ability to supply a selector. This will tell ThemeKit to write out styles in the header for that selector.

<?php
$tk = new ThemeKitForWP();
$tk->set_option_name('cadet-options');
$optns = array ();

$optns[] = array(
	"desc" =>"Cadet 1.2",
	"type" => "title"
	);

$optns[] = array(
	"name" => "Logo & Tagline",
	"type" => "section"
	);

$optns[] = array(
	"name" => "Logo Display",
	"desc" => "Choose how you would like the logo to be displayed.",
	"id" => "logo_display",
	"type" => "radio",
	"std" => "text",
	"options"=> array(
		"text" => "Text Only",
		"textimage" => "Text with Uploaded Image to the left",
		"image" => "Uploaded Image Only"
		)
	);

$optns[] = array(
	"name" => "Logo Text",
        "id" => "title_color",
	"std" => array('size' => '40','face' => 'Helvetica','style' => 'normal','color' => '#ffffff'),
	"type" => "typography",
	"selector" => "#site-title a",
	"style"=>'font'
	);

$optns[] = array(
	"name" => "Logo Image",
	"id" => "logo_image",
	"std" => "",
	"type" => "upload"
	);

$optns[] = array( "type" => "close"); //End Logo Section

//Register Theme Options
$tk->register_options($optns);

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>