Codex

Custom Backgrounds

Custom Backgrounds is a theme feature that provides for customization of the background color and image.

See also Appearance Background Screen.

Adding Theme Support

Since Version 3.4, themes need to use add_theme_support() in the functions.php file to supports custom backgrounds, like so:

add_theme_support( 'custom-background' );

Note that you can add default arguments using:

$defaults = array(
	'default-color'          => '',
	'default-image'          => '',
	'wp-head-callback'       => '_custom_background_cb',
	'admin-head-callback'    => '',
	'admin-preview-callback' => ''
);
add_theme_support( 'custom-background', $defaults );

Example

An example using default '#000000' background color with 'background.jpg' background image:

$args = array(
	'default-color' => '000000',
	'default-image' => get_template_directory_uri() . '/images/background.jpg',
);
add_theme_support( 'custom-background', $args );

Related

Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()
Theme Features: widgets, menus, post-formats, post-thumbnails, custom-background, custom-header, automatic-feed-links, editor-style