Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter


Welcome to the new Community Forums!

Existing Users: As an additional security precaution measure, please reset your password and login with your new password given to you via your email.

New Users: You are required to link with either your Facebook, Twitter, Google or OpenID account to register.

If you have any other issues, please send the administrator an email at support [ a t ]
Header image height adjustment again - sorry to be a pain...
  • Happy New Year !!

    I want to place a 960x140px image in the page header (changed from the default 120px) and have made the following adjustments:

    a) edited functions.php so that I now have:
    add_theme_support( 'custom-header', array (
    'width' => 960,
    'height' => 140,
    'default-text-color' => '333',
    'wp-head-callback' => 'ar2_header_style',
    'admin-head-callback' => 'ar2_admin_header_style',
    'admin-preview-callback' => 'ar2_admin_header_image',

    b) edited style.css so that I now have:
    /* =Header
    #header {
    max-width: 960px;
    height: 140px;
    margin: 0 auto;
    padding: 10px;
    background: #FFF;

    c) edited user.css and added:

    #header { height:140px !important;}

    ........and it's still not working. I think the header is 140px deep but the image is still cropped to 120px deep, with 20px of white space unused below the image.

    I think I have fixed this before with some .php code which was inserted (I think) into the header.php file but I can't find the snippet. I'd be grateful for any suggestions.

    problem visible at

    Best wishes for 2013.
  • Found the solution:

    alter line 756 in styles.php to required image height. (Having left all code as described above in situ).

    Again, best wishes for 2013.
  • Could you say what you changed on line 756? For me line 756 is the flickr social button... Also, I assume you meant style.css?

    Thanks -
  • It is 756 in styles.php I think it is in code which makes the header image clickable to return to the home page.

    Good Luck.
  • In styles.php you need to search for this function:

    function ar2_header_style()

    Within that function you'll have
    height: <?php echo get_custom_header()->height; ?>px;

    Since you already modified the functions.php file I don't see why it isn't allowing you to crop the correct height & width. I'd make sure that this function has that above height line. and that the actual function controlling the wp-admin front end cropping system has:

    function ar2_admin_header_style()

    has the same:
    height: <?php echo get_custom_header()->height; ?>px;

    If you don't want to deal with th efront end just place the exact height size in the ar2_header_style() function.
    height: 140px;

    That should work