Header Image Size Change

  • serisys


    I’ve picked the graphene theme because it looks great and you seem to have put some unique thought into it – great job! I’m code knowledgable but not an expert.

    I’d like to change the existing header image size. I know the CSS needs changing which I did;








    But now I need to get around the auto image crop & upload code.

    Any suggestions or could you point me in the right direction?

    Thanks Syahir.



    Syahir Hakim


    In addition to changing the CSS codes you mention above, you also need to change several parameters. By using a child theme, put this code into functions.php file in your child theme:

    function graphene_custom_header_width(){
    return 900;
    function graphene_custom_header_height(){
    return 198;
    add_filter('graphene_header_image_width', 'graphene_custom_header_width');
    add_filter('graphene_header_image_height', 'graphene_custom_header_height');

    Change the values inside the functions to the corresponding width and height that you want.

    Note that this code in untested, but it should work. Let me know if you run into any problem.



    Thanks Syahir… That did it! Picture upload and crop all works.


    style.css (as my post above)

    function.php (as your post above with my values)

    Before I head to the donate button (as everybody should), what is the best way to add a widget into the header?

    Many thanks.



    Syahir Hakim


    The easiest way I can think of right now without modifying the theme’s codes is by defining your own widget area in the child theme’s sidebar.php, create a function that displays the widget area, hook that function to one of the action hooks available with the theme, and then use CSS absolute positioning to position the new widget area you just define.

    Not exactly easy, I know, but doable 🙂

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

  • You must be logged in to reply to this topic.