How to change the height of the header – and other questions

  • Ianro

    #53

    Thank you so much for developing this great theme. I’m not familiar with php, but I’ve been able to do a lot with the site without that understanding.

    I’m starting to play around with the php code and would like to change the height of the header image, as it doesn’t work very well with our logo.

    Additionally, I would like to change the color of the menu bar and the main column frame (which is currently black).

    Please help!

    Thank you,

    Marie

    shmarie

    #10981

    for your reference, the site i am working on is warn-trafficking.org/new_site

    i would really appreciate any input.

    thank you!

    Admin

    Syahir Hakim

    #10982

    I’m starting to play around with the php code and would like to change the height of the header image, as it doesn’t work very well with our logo.

    You need to change the CSS properties of the #header element. If you’re modifying the theme using a child theme, this is what you would have to add to the child theme’s style.css file:

    #header {
    height:298px;
    }

    Additionally, you would have to create a new functions.php file in the child theme’s folder, and add the following PHP code:

    <?php

    /**
    * Modify the height of the header image
    */
    function graphene_modify_header_height(){
    return 298;
    }
    add_filter('graphene_header_image_height', 'graphene_modify_header_height');

    ?>

    Modify the value after the height: in the CSS file and after the return in the PHP file to whatever height you want to use for your header image. Notice that the height in the PHP file doesn’t require unit, but the CSS file does.

    Additionally, I would like to change the color of the menu bar and the main column frame (which is currently black).

    You can modify the colour of the menu bar and the column frame by modifying the child theme’s style.css as well. You will also need to edit or create a new background image to be used for the colour you want. This is quite an easy fix if for someone who is proficient with CSS and sprite images, but quite a lot to explain it here. You might want to get someone to do that for you.

    dbsporting

    #10983

    Hi Syahir,

    I, too, would like to amend the height of the header image.

    I have set up a child theme and added the CSS code as suggested above

    #header {

    height:198px;

    }

    with the required value.

    However, please could you advise me the purpose of the functions.php file? I tried to add a file to my graphene-child folder in the backend, but then it crashed the site, for some reason.

    Parse error: syntax error, unexpected ‘<‘ in /websites/123reg/LinuxPackage21/fr/ee/be/freebetsfreetips.com/public_html/blog/wp-content/themes/graphene-child/functions.php on line 41

    Is the functions.php bit necessary, or will it work with just the css bit? (sorry if that is a stupid question… still a novice with this stuff!).

    Many thanks in advance, and thanks for the great theme!

    Dave

    http://www.freebetsfreetips.com

    dbsporting

    #10984

    Hi,

    As well as the above post, if I wanted to upload a new header image of 900 x 60, how would I avoid having to crop the image to make it 900 x 198? Does that make sense?

    Firstly I change the height of the header, but then I’d like to upload an image of height 60 pixels without being forced into resizing it… is there a way to do so?

    Many thanks in advance,

    David

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

You must be logged in to reply to this topic.