WordPress.org

Ready to get started?Download WordPress

Forums

Using Featured Image as Header: Size Question (2 posts)

  1. Ben B
    Member
    Posted 2 years ago #

    Hello!

    I'm using Twenty Eleven, and have seen the recommendations for using a child theme and functions.php to re-define the header size. This works for run-of-the-mill headers.

    I'm struggling with using a Featured Image. When I used an appropriately sized featured image (at least 100 x 288) the image is always cropped to 288px, regardless of what I put in functions.php.

    When I add a new header image under the Theme tab, this is always 180px as I have defined. The lines from my child theme functions.php are:
    remove_filter( 'HEADER_IMAGE_WIDTH', 'twentyeleven_header_image_width' );
    remove_filter( 'HEADER_IMAGE_HEIGHT', 'twentyeleven_header_image_height' );
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'child_header_image_width', 1000 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'child_header_image_height', 180 ) );`

    Can anyone help with this case...changing the default size of a featured image used as a header?

    Thanks

    Ben

  2. Ben B
    Member
    Posted 2 years ago #

    Sorry to *bump* but can anyone help with where the 288px figure comes from for the header image in the Twenty Eleven theme?

Topic Closed

This topic has been closed to new replies.

About this Topic