WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please give me details on how to remove the custom header image in the Twenty Eleven theme.

share|improve this question

Login to the admin, go to appearance then click on header link (will be shown if the theme is currently activated). After that click 'Remove Header Image' button there.

If you want to remove this in the code. Then, go to the theme folder, open header.php. Find and delete this code:

    // Check to see if the header image has been removed
    $header_image = get_header_image();
    if ( ! empty( $header_image ) ) :
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
        // The header image
        // Check if this is a post or page, if it has a thumbnail, and if it's a big one
        if ( is_singular() &&
                has_post_thumbnail( $post->ID ) &&
                ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
                $image[1] >= HEADER_IMAGE_WIDTH ) :
            // Houston, we have a new header image!
            echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
        else : ?>
        <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; // end check for featured image or standard header ?>
<?php endif; // end check for removed header image ?>

Hope it answers your question.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.