Support » Themes and Templates » Header Image Size – TwentyEleven

  • Resolved playing2012


    How do I ensure that the image I upload is exactly 1000px x 180px and not the default of 2011 theme that is 1000px x 288px? I want to create an exact size so that it is not cropped or resised to some arbitrary figure.

    I have just set up a new site but the image is pretty big for what I want to do. Have a look here:


    It is still at an embryonic stage so please don’t laugh!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Marventus


    If you are using TwentyEleven, I’m pretty sure there is a hook to set the size of your header images. Don’t remember the name right now, and I have one foot out the door, but if you give me a few hours I’ll look it up for you.



    Hi –
    There is a helpful tutorial at the link below on how to do this.

    Thanks for the replies. I went to the tutorial but it is for the old version. However, it gave me the idea and I inserted this function in my child-theme functions.php and it works:

    function add_theme_support($support_type)
        $result = 0;
        return $result;
    function apply_filters()
        $result = 0;
        return $result;
    // This theme uses Featured Images (also known as post thumbnails) for
    per-post/per-page Custom Header images
    // Add support for custom headers.
    $custom_header_support = array(
        'default-text-color' => '000',
        'width' => apply_filters( 'twentyeleven_header_image_width', 1000) ,
        'height' => apply_filters( 'twentyeleven_header_image_height', 133 ),
        'flex-height' => true,
        'random-default' => true,
        'wp-head-callback' => 'twentyeleven_header_style',
        'admin-head-callback' => 'twentyeleven_admin_header_style',
        'admin-preview-callback' => 'twentyeleven_admin_header_image',
    echo "
    echo "</pre>

    Please follow this guide when posting code – I’ve fixed what I can, but the forum may have eaten some of your code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Header Image Size – TwentyEleven’ is closed to new replies.