Custom header height

Home Forums Book Lite Custom header height

Tagged: ,

This topic contains 14 replies, has 6 voices, and was last updated by  knrende 6 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1175

    kermitjr
    Member

    First off… I LOVE the theme.  However, the header is massive.  Is there any way to make the height adjustable without messing up the theme?

    Thanks!

    KJ

    #1184

    Chandra
    Keymaster

    Hi KJ,

    What size are you look to add? I think with both header on and off, they should be of similar height. Are you trying to decrease that?

    There are 2 places where you can change. Open inc/custom-header.php and look for 500. Change that to your need. Also in functions.php, there is this line

    add_image_size( ‘featured’, 1440, 500, true ); //(cropped)

    Change that 500 to your need.

    Thanks,
    Chandra

    #1207

    kermitjr
    Member

    Good morning, Chandra!

    Thank you for the reply.  I tried changing one or the other, and couldn’t quite get it to work, but changing both has, indeed, changed the appearance.

    I tried 200, but the Header title went up and over the links.  Oops!  So 300 seems to work well for appearance.

    Unfortunately, the links across the top no longer work… http://www.avalontheretreat.com/

    I really like the theme and want to make it work… I would even be willing to pay for an update to the “headers” section in the theme setup to be able to make these adjustments naturally.

    Many thanks!

    Kermit

    #1208

    Zaratustra
    Member

    I was wondering if it’s possible for that huge image to only show up on a front page but not in other pages

    #1221

    Chandra
    Keymaster

    Hi Kermit,

    I think I know what might be happening. Is 200 your ideal height? If so, please feel free to send me your wp-admin login and FTP details and I will fix this for you. Email me at maharzan(at)gmail.com.

    Thanks,
    Chandra

    • This reply was modified 2 years ago by  Chandra.
    #1223

    Chandra
    Keymaster

    Hi Zaratustra,

    You can choose to not have any featured images in your posts. This hides the images in the single pages. Alternately, you can open inc/custom-header.php and remove this bit of code line 94 through 160.


    if( has_post_thumbnail() ) :

    $featured_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'featured');
    $header_image = "background: url(" . $featured_image_url[0] . ") center 0 no-repeat; background-attachment: fixed;";
    $textcolor = "#fff";
    $background = "url( ". get_template_directory_uri() ."/images/nav-bg.png)";
    $libackground = "url( ". get_template_directory_uri() ."/images/diamond-white.png)";
    $bgcolor = "#111";
    $height = "500px";
    $paddingbot = "0";

    else :

    $header_image = "";
    $textcolor = "#000";
    $libackground = "url( ". get_template_directory_uri() ."/images/diamond.png)";
    $bgcolor = "none";
    $height = "auto";
    $background = "none";
    $paddingbot = "auto";

    endif;
    ?>

    hgroup {
    position: absolute;
    bottom: 50px;
    width: 100%;
    }

    #masthead {

    margin-top: 0;
    padding-bottom: ;
    max-width: 100%;
    height: ;
    position: relative;
    background-color: ;
    }
    .admin-bar.custom-header #masthead {
    background-position: center 28px;
    }
    #page {
    max-width: 100%;
    }
    #main, #colophon {
    max-width: px;
    margin: 0 auto;
    }
    .main-navigation {
    background: ;
    }
    .main-navigation ul a {
    color: ;
    }
    .home .main-navigation ul li, .main-navigation ul li {
    background: 0 24px no-repeat;
    }
    .main-navigation ul li:first-child {
    background: none;
    }
    .site-title a {
    color: ;
    }

    < ?php

    Hope that helps.

    Thanks,
    Chandra

    • This reply was modified 2 years ago by  Chandra.
    • This reply was modified 2 years ago by  Chandra.
    • This reply was modified 2 years ago by  Chandra.
    • This reply was modified 2 years ago by  Chandra.
    • This reply was modified 2 years ago by  Chandra.
    #1667

    Riley
    Member

    Thank you again for this beautiful theme, I am struggling to make this solution work, I have changed the following:

    In functions.php:

    50     add_image_size( ‘featured’, 1440, 250, true ); //(cropped)

    In the custom-header.php:

    15        ‘height’                 => 250,

    102     $height = “250px”;

    To no avail… Please help!

    Riley

    #1671

    Chandra
    Keymaster

    Hi Riley,

     

    Again, hope you don’t have those line numbers in the code.

     

    Thanks,
    Chandra

    #1676

    Riley
    Member

    Chandra,

    I just wanted to update you on my progress with this, suddenly I can see the change to header height, but only in one browser (chrome) and only in post preview mode… (http://www.otherwaysblog.com/?p=195&preview=true). I have not touched the custom-header.php file at all since yesterday when I made the above post. I thought it might be a cache issue, so I cleared all browsing history data in both Safari and Firefox but both are still displaying the awkwardly large header image height…

    Thanks again in advance for your assistance.

    Riley

    #1678

    Chandra
    Keymaster

    Hi Riley,

    I have posted you a message on your other post.

    Thanks,
    Chandra

    #1689

    jasongerbing
    Member

    I’m trying to do the opposite, and make my banner bigger… I used your advice above and changed the dimensions to 600 x 2000 in the two .php files.  The width change is obvious, but the height change is not.  I’m guessing there is something else i have to change to bump that main area down to reveal the bigger banner?  Thanks in advance for your help!

     

    http://jasonanderinaretyingtheknot.com/

    #1692

    Chandra
    Keymaster

    In inc/custom-header.php you should see this

     

    // Set height and width, with a maximum value for the width.
    ‘height’                 => 500,
    ‘width’                  => 1440,

     

    You can change those parameters as well. Did you miss that?

     

    Thanks,
    Chandra

    #1693

    jasongerbing
    Member

    I had done that, but what I HADN’T tried was uploading a new image using the wordpress admin…  I had only uploaded the image with the new dimensions using my ftp software, which was showing the new image and new width, but not height.  Works now though!  Thanks for the speedy reply, love the theme!

    #1696

    Chandra
    Keymaster

    Great. :) Thanks for confirming.

    #2211

    knrende
    Participant

    RE: Having header only show up on front page.

    I am trying to have the header on the front page then some pages with featured images and some pages without any header at all.

    How do I achieve having no header at all on some pages?

    Thanks, this theme is so lovely!

    Kathryn

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.