Swapping WordPress’ jQuery for Google APIs Version

function jQueryGoogleApiInit()
{
	// Make sure we're loading the Google API version of jQuery. Much faster //
	wp_deregister_script('jquery');
	wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
}
add_action('init', 'jQueryGoogleApiInit');

Adding Theme Feature Support

Support added to functions.php.

Theme-Supported Features

Menu Support

register_nav_menus(array('primary_menu'=>'Primary Navigation Menu', 'footer_menu'=>'Secondary Footer Menu'));

Featured Image / Post Thumbnails Support

add_theme_support('post-thumbnails');

Automatically Add Feed Links To

add_theme_support('automatic-feed-links');

Admin Area Stylesheet

add_editor_style($stylesheet);

$stylesheet is a string path to the stylesheet you wish to add relative to the theme root. Can also be an array of strings.

Custom Backgrounds Support

add_custom_background($header_callback, $admin_header_callback, $admin_image_div_callback);

Custom Image Header Support

add_custom_image_header($header_callback, $admin_header_callback);

Widget Support


// Make Theme Accessible to Widgets //
if(function_exists(‘register_sidebar’))
{ // Full featured sidebar // register_sidebar(array ( ‘name’ => sprintf(__(‘Sidebar %d’), $i ), ‘id’ => ‘sidebar-$i’, ‘description’ => ‘’, ‘before_widget’ => ‘
  • ‘, ‘after_widget’ => ‘
  • ‘, ‘before_title’ => ‘

    ‘, ‘after_title’ => ‘

    ‘ ));

    // Minimal Sidebar // register_sidebar(array ( ‘before_widget’ => ‘

    ‘, ‘after_widget’ => ‘
    ‘, ‘before_title’ => ‘
    ‘, ‘after_title’ => ‘
    ‘, ));
    }