• Hi, I can’t seem to change the size of this header image. I am using a child theme and have googled. The info I got was to copy the custom-header.php file from the main theme over to my child theme, and adjust the sizes specified here:

    function twentytwelve_custom_header_setup() {
    	$args = array(
    		// Text color and image (empty to use none).
    		'default-text-color'     => '515151',
    		'default-image'          => '',
    
    		// Set height and width, with a maximum value for the width.
    		'height'                 => 250,
    		'width'                  => 960,
    		'max-width'              => 2000,
    
    		// Support flexible height and width.
    		'flex-height'            => true,
    		'flex-width'             => true,

    … but it never has any effect. Any clues as to what I’m doing wrong?

    Thanks

    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Alex!

    I faced the same problem you did, but managed to FINALLY figure it out. You should go to header.php, not custom-header.php. Once you’re there, look for this:

    <?php if ( get_header_image() ) : ?>

    Two lines below that should be a width="< cooooode; ?>" height="< coooode; ?>" alt="" />

    Delete the whole of the < cooooode; ?> for both the width and height and replace them with your desired size. So it should look something like this instead:

    width="450px" height="450px" alt=""

    This was what worked for me — hopefully it’ll work for you as well!

    Thread Starter VisibleMusic

    (@visiblemusic)

    Holy crap – it did work!

    Muchos gracias senor!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Resizing header image in twenty twelve’ is closed to new replies.