• Hello everyone, My wordpress 3 site is located at https://www.jawaunesaad.com and I created a simple child theme of the twentyeleven theme. I am also watching the lynda.com training videos for wordpress 3. The problem is those videos are a few years old and wordpress has made some changes since then.

    On of the things I can’t get to work is where I create a function.php file in my child theme’s directory and copy the the code for changing the header size. The current 1000 x 288 header size is far to large for the look I want to accomplish. Could someone please walk me through the steps I get this done? The size I’d like to have is 960 x 180. Thank you everyone…

Viewing 5 replies - 1 through 5 (of 5 total)
  • you create a file functions.php in your child theme and have opening phptag <?phpand then in next line add the filter like

    <?php
    add_filter('twenteleven_header_image_height','my_header_height');
    add_filter('twentyeleven_header_image_width','my_header_width');
    function my_header_height($size){
       return 196;
    }
    function my_header_width($size){
       return 494;
    }
    ?>

    Change the height and width as you want and you can add any other custom functions after <?php

    I have the same problem as jawaune. Sort of. I don’t need 1000 X 288. My header is 476 X 160. Under Appearance > Header in the Dashboard, I have uploaded my image several times and attempted to crop it and publish it. The default height is 288 px. My image is only 160 px, yet the bottom of my image does not get displayed. I’ve looked in functions.php and have tried your solution but I still lose the small line of text and a drop shadow at the bottom. Any thoughts?

    Please post your own topic.

    I will, with my solution. But why do I need to start a new topic?

    Thank you, govpatel. I didn’t use your exact solution, but a variation in functions.php worked. Much obliged.

    Because yours is not the same issue. And because it is forum policy. Please do not make the hard work that forum volunteers do even harder.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Change Header Width and Height in a Child Tmeme’ is closed to new replies.