Support » Themes and Templates » Preventing header resizing in twenty-eleven theme

  • Resolved MC


    I am building a child theme for twenty-eleven. I came across this closed thread referring to commenting out 2 lines in the functions.php in the parent theme folder.

    Is there a way to override this. It seems he refers to a way but there isn’t really any conclusion in that thread it seems whether or not that works. Here is the part of the thread I am interested in looking into a bit more. Ideally, of course, I would prefer to make the modifications in the child themes functions.php file, not the parent.

    The following lines are quoted from that thread.

    There is also a function remove_theme_support(), not sure if it works in reverse, try adding nested inside you child themes after_setup_theme function.

    /* Remove theme support for Post Thumbnails */
    function remove_custom_theme_support(){
    add_action( 'after_setup_theme', 'remove_custom_theme_support', 11 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • For now I am going to hard code it into the header.php in my child theme in order to sidestep this using conditional tags, but I would really like to figure out how to do this in the child theme. The code I posted was referencing the 2010 theme. I am using 2011, but its a development site so I guess its a good place to test it out and see what happens 🙂

    I figured it out so I wanted to contribute the solution in case anyone is looking for the answer here.

    I put these lines in the child themes functions and modded the sizes

    // override header image resizing function in theme
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1000 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 500 ) );

    Hope this helps 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Preventing header resizing in twenty-eleven theme’ is closed to new replies.