Site logo

Archived topic

Page header image above menu

26 replies · Started by Craig on March 7, 2017

Viewing posts 1–15 of 27

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?

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

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

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?

*edited

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 :)

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

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 :D

Glad we could help :)

Hi Tom,

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

Paul

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 );
    }
}

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

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?

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

This archived topic is closed to new replies.