• Resolved lizzyb

    (@lizzyb)


    Hi – Im creating my own child theme using 2010 as the base. Im just tweaking a few bits.

    I want to have the main header image a little taller on each page. I found the functions.php file and changed
    define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘twentyten_header_image_width’, 940 ) );
    define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘twentyten_header_image_height’, 198 ) );

    and changed the hieght from 198 to 230. This works fine if I just leave it like that but I know I need to copy the functions file into my child theme. If I do this though my whole site breaks.

    Can anyone advise?

    Thanks
    Liz

Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to add a new filter in your child theme – eg:

    add_filter( 'twentyten_header_image_height', 'child_header_height' );
    function child_header_height ($height) {
        $height = 230;
        return $height;
    }

    Thread Starter lizzyb

    (@lizzyb)

    Thanks Esmi

    That has worked for the main header image but not for the header on the others pages when i use the featured image.

    Any chance you can help with the code for this. Im no PHP whizz!

    LIz

    PS – going to try though!

    Try adding a second filter to your child theme:

    add_filter( 'twentyten_header_image_width', 'child_header_width' );
    function child_header_width ($width) {
        $width = 230;
        return $width;
    }
    Thread Starter lizzyb

    (@lizzyb)

    Hi Esmi –

    I finally got this one figured by searching for hours! Someone made a comment on a thread that if you change size settings you have to completely reupload the image to be used.

    I had been unlinking and relinking within the page. Once I deleted and uploaded again it took the parameter as specified in the function overide code you kindly gave me before.

    Thanks once again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Changing header image size – 2010 theme’ is closed to new replies.