How to change the header size in TwentyEleven and TwentyTen

To change the header size in width or height or both of the TwentyEleven or TwentyTen theme in WordPress you need to add a snippet of code to the ‘functions.php’ file in your parent theme or child theme – the preference is to make a child theme and create/change the  functions.php file in there.

The reason for this is that if the main theme is updated you will lose your custom changes.

The functions file can be found as below:

/public_html/wp-content/themes/twentyeleven/functions.php

Add in the content below and change the numbers at the end to reflect the size required:

// The height and width of your header.
define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 1000 ) );
define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 130 ) );

What you need to change is the pixel dimensions for your required height and width. Now you can create a graphic to those dimensions and upload it through the front end WordPress interface.

In the WordPress dashboard go to Appearance > Header

twenty-eleven-header-change-size

twenty-eleven-header-change-size

 

 

 

 

Now you can see the changes are reflected of the Upload Image dialog box.

Leave all Comment