WordPress.org

Support

Support » How-To and Troubleshooting » Change Height of Header Image

Change Height of Header Image

  • I’m using Third Style by Paomedia and want to edit the header to fit a bigger image in but when i change the:

    define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘thirdstyle_header_image_width’, 940) );
    define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘thirdstyle_header_image_height’, 198 ) );

    From 198 to say 500 in the Functions.php it does nothing.
    Does anyone know what i’m doing wrong?

    http://www.oakfieldpri.co.uk/
    Here is a link to the site at the moment.
    Any helkp would be much appreciated this issue has been annoying me for a while now!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Michael
    Moderator

    @alchymyth

    you might to re-upload the bigger image after the change in functions.php;

    in which page is the header image supposed to be larger?

    manifestcreative
    Member

    @manifestcreative

    Try adding this into your functions.php file and let me know if it works.

    add_filter('thirdstyle_header_image_height', 'my_custom_header_height');
    function my_custom_header_height($height) {
     return 500;
    }

    Header images also use WordPress’ thumbnailing system, so you may want to check out the AJAX Thumbnail Rebuild plugin and run that.

    It works in the Header editor but it does not change on the actual displayed page!

    manifestcreative
    Member

    @manifestcreative

    OK. Well at least we’re getting somewhere!

    Can you post the code from your header.php file that controls displaying the header image? If it references a function probably something like thirdstyle_header_image() please copy-paste that function.

    Also tried adding a larger image to the size I specify, but still no joy.

    Is this it?

    <body <?php body_class(); ?>>
    <div id=”wrapper” class=”hfeed”>
    <div id=”header” style=”background:url(<?php header_image(); ?>) no-repeat top left;”>
    <div id=”masthead”>
    <div id=”branding” role=”banner”>
    <?php $heading_tag = ( is_home() || is_front_page() ) ? ‘div’ : ‘div’; ?>
    <<?php echo $heading_tag; ?> id=”site-title”>

    manifestcreative
    Member

    @manifestcreative

    Back to your functions.php file. Try changing the following line:
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'thirdstyle_header_image_height', 198 ) );

    Change it to:

    define( 'HEADER_IMAGE_HEIGHT', 500 ) );

    Then re-upload your larger image and select it as the header.

    Unfortunately that just crashed it and i had to edit it back and reupload the function.php, any other ideas?

    manifestcreative
    Member

    @manifestcreative

    Have you run the AJAX Thumbnail Rebuild plugin mentioned in my earlier post, each time you’ve changed the header image size?

    I have now unfortunately it hasn’t had any affect.

    AnimeFunTV
    Member

    @animefuntv

    Try going to the style.css

    search for

    #header {
    padding-top: 20px;
    -moz-border-radius: 8px 8px 0px 0px;
    -webkit-border-radius: 8px 8px 0px 0px;
    border-radius: 8px 8px 0px 0px;

    change the “padding-top” from 20px to 198px

    that worked perfectly for me.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Change Height of Header Image’ is closed to new replies.