[Resolved] Page header image above menu

Home Forums Support [Resolved] Page header image above menu

Home Forums Support Page header image above menu

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #288449
    Craig

    Hi Tom,

    I was wondering if there’s any way to get the page image header to display above the menu rather than underneath it?

    #288540
    Leo
    Staff
    Customer Support

    Hi Craig,

    Do you want that image on every page? If so then you can use the before header content hook.
    https://docs.generatepress.com/article/hooks-overview/
    http://demo.generatepress.com/hook-locations/

    Let me know if this is not what you wanted.

    #288549
    Craig

    Hi Leo,

    Thanks for the reply.

    I understand I need to use the before header hook, but what I don’t understand is what exactly I need to put in there to make the header image display above the main navigation rather than underneath it. Any ideas?

    Cheers

    #288551
    Leo
    Staff
    Customer Support

    So you inserted the image and it shows up below the menu? Can you show me the site?

    #288561
    Craig

    Hi Leo,

    I’m rebuilding a site in GP locally at the moment but I can give you a screenshot.

    See the featured header image displays under the main navigation.

    http://imgur.com/a/VYCT7

    What I need is for the featured header image to display above the navigation like it does here – http://www.orabeauty.co.uk/pricelist/

    Does that make sense?

    #288564
    Craig

    *edited

    #288568
    Tom
    Lead Developer
    Lead Developer

    You could try doing something like this:

    add_action( 'after_setup_theme','craig_move_navigation' );
    function craig_move_navigation() {
        remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
        add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know if this helps or not πŸ™‚

    #288569
    Leo
    Staff
    Customer Support

    Try Dashboard > Appearance > GP Hooks and add this in the Before Header Content hook:
    <img src="http://IMAGE-URL-HERE"/>

    #288574
    Craig

    Nailed it Tom! That’s exactly what I was trying to do but I don’t know much about PHP.

    Thanks so much for the support guys πŸ˜€

    #288575
    Leo
    Staff
    Customer Support

    Glad we could help πŸ™‚

    #474381
    Paul

    Hi Tom,

    How could I modify what you posted in reply #288568 so that it only affects the home page?

    Paul

    #474517
    Leo
    Staff
    Customer Support

    Try

    add_action( 'after_setup_theme','craig_move_navigation' );
    function craig_move_navigation() {
        if ( is_front_page () ) {
            remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
            add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );
        }
    }
    #474538
    Paul

    Thanks, Leo. You rock! Will give it a try.

    #483897
    drew

    Leo: per the

    Try Dashboard > Appearance > GP Hooks and add this in the Before Header Content hook:
    <img src="http://IMAGE-URL-HERE"/>

    …instructions, how would I get that image to repeat?

    #484036
    Leo
    Staff
    Customer Support

    Not sure what you mean? It’s a static image so you can just add it as many times as you want.

Viewing 15 posts - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.