Home Forums Pure Theme Discussion & Support Long horizontal header

This topic is: resolved

This topic contains 3 replies, has 2 voices, and was last updated by  themeweaver 4 years, 9 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2629

    Lohan Grobler
    Member
    Post count: 1

    Hi Tim,

    Is it possible to apply a long horizontal image at the very top of the page before the title and logo?

    #2630

    themeweaver
    Keymaster
    Post count: 730

    First of all you need to consider that this is a responsive theme. So what will a long full width header image look like on a iphone, ipad, small desktop, large desktop… etc? It would be hard to make it look good imho.

    To put something at the top like this you would need a custom header.php file in a child theme.

    The preferred place for a large header image would be at the top of the main content area. This way, the responsive part of the theme is less affected.

    There is a hook for this, so that in a functions.php in a child theme you could do something like:

    add_action( 'livingos_abovemain', 'mynew_image');
    
    function mynew_image() {
    
       echo '<img src="http://url-of-image/" />';
    
    }
    
    #2631

    Lohan Grobler
    Member
    Post count: 1

    Uhm sorry for my ignorance, I am pretty new to this.

    Do I have to create a header.php file and place it in the child theme folder and then go into my child theme’s functions.php file and add the code in there?

    Do I have to first create the classes ‘livingos_abovemain’ and ‘mynew_image’ in my child theme’s styles.css?

    #2632

    themeweaver
    Keymaster
    Post count: 730

    Not really. This is fairly advanced stuff.

    And it isn’t CSS, this is PHP. You would need some CSS too, but I haven’t covered that above.

    And you don’t need to edit header.php if you choose the preferred option of adding the hook code.

    Everything you do should be done in a child theme though:
    http://themeloom.com/support/framework-codex/developers/creating-a-child-theme/

    We do also offer customisation services if need : http://themeloom.com/custom-wordpress-themes/

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

You must be logged in to reply to this topic.