• hello,

    I’m building a word press site:
    https://redwoodempirebusiness.com/

    I put the wp-cycle on the header of each page (soon to be moved to just the home), the image is distorted. how do I resize the header image space, so the image isn’t distorted?

    BTW, I’ve tried creating a child theme and changing the code, but doesn’t seem to work. I’m new at this, so please be detailed in your explanations. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • To change the header image size setting you’ll need to redefine them in “functions.php” in the twenty ten theme you’ll find these starting on line 114.

    This is what it looks like:

    // The height and width of your custom header. You can hook into the theme's own filters to change these values.
    	// Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
    	define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );

    You’ll need to change it to something like:

    // The height and width of your custom header. You can hook into the theme's own filters to change these values.
    	// Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
    	define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 800 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 600 ) );

    Also you missed a piece of code in the header thats printing broken code out to the html.

    Hope this helps, good luck.

    I looked a little farther into your themes code, I see that you had part of it, but you have to move it to the “functions.php”

    The functions.php of your child theme should look like this:

    <?php
    add_filter('twentyten_header_image_height','my_header_height');
    add_filter('twentyten_header_image_width','my_header_width');
    function my_header_height($size){
       return 600;
    }
    function my_header_width($size){
       return 800;
    }
    
    ?>

    You could also remove the #rotator css altogether.

    Thread Starter reba9528

    (@reba9528)

    hi Enile,

    thanks for the advice. I found the functions.php in the theme. it will be very useful as a lot of stuff is customized in the functions.php section. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to resize header in twenty ten template’ is closed to new replies.