Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

The question is How do I make the header on the Twenty Ten theme less tall? That question was asked over at the LinkedIn WordPress group that is hidden from search engines so I thought I'd copy my answer to here.

I've also made it a community wiki so it doesn't pass reputation to me.

share|improve this question
add comment

2 Answers

up vote 9 down vote accepted

To make the header on the Twenty Ten theme less tall (i.e. a height with fewer pixels) put this code at the bottom of your theme's "functions.php" file (being sure to change the number 180 to whatever height you want):

<?php 
add_action('twentyten_header_image_height','yoursite_header_image_height'); 
function yoursite_header_image_height($height) { 
   return 180; // Modify this to whatever pixel height you want. 
} 

Then you'll need to go to "Appearance > Header" in your admin console and upload your new smaller image (here's the URL to that admin page):

http://example.com/wp-admin/themes.php?page=custom-header

And here's what that admin page looks like:

Screenshot showing WordPress Twenty Ten theme header iamge

You might also consider making your modifications on a "Child Theme" (if you have not already.) Here's an article (that is overly complicated) but it's really as simple as just creating a directory on your web server under the "/wp-content/themes/" subdirectory (I'd call it "/wp-content/themes/yoursite/") and creating a "style.css" in that directory with the following:

/* 
Theme Name: Your Child Theme Name
Description: Theme for your-site.com 
Author: Your Name
Version: 1.0 
Template: twentyten 
*/ 
@import url("../twentyten/style.css"); 

Then you can create a new "functions.php" file and put the above PHP code in it rather than modifying the files in the directory of the TwentyTen theme and having to deal with doing it again it when Twenty Ten has a security update.

Hope this helps.

-Mike

share|improve this answer
    
Great answer, as many others. –  Tal Galili Aug 18 '10 at 2:28
    
@Tal Galili: Thanks! –  MikeSchinkel Aug 18 '10 at 3:45
add comment

I cheated and used css in the style.css file Mike's method is better if you want let users edit the header. I turned that feature off altogether.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.