Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

how to add three default images to wordpress custom background?

enter image description here

now, i want to add three default images which can be selected one by the user.and it locates on the upload Image this:

the default background image:

enter image description here

how do i do thank you.

share|improve this question

migrated from Jun 23 '11 at 10:29

This question came from our site for professional and enthusiast programmers.

You should take a look at - this is the function you need to setup your own images when using custom headers. – user8394 Sep 3 '11 at 14:43

1 Answer 1

You can see how the code is put to work in functions.php of TwentyEleven theme, line 135 - 195.

The codes to register your images are:

add_custom_image_header( 'twentyeleven_header_style', 'twentyeleven_admin_header_style', 'twentyeleven_admin_header_image' );
register_default_headers( array(
    'wheel' => array(
        'url' => '%s/images/headers/wheel.jpg',
        'thumbnail_url' => '%s/images/headers/wheel-thumbnail.jpg',
        /* translators: header image description */
        'description' => __( 'Wheel', 'twentyeleven' )
    'shore' => array(
        'url' => '%s/images/headers/shore.jpg',
        'thumbnail_url' => '%s/images/headers/shore-thumbnail.jpg',
        /* translators: header image description */
        'description' => __( 'Shore', 'twentyeleven' )
) );
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.