- This topic has 26 replies, 10 voices, and was last updated 4 years ago by Leo.
-
AuthorPosts
-
March 7, 2017 at 1:08 pm #288449Craig
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?
March 7, 2017 at 4:43 pm #288540LeoStaffCustomer SupportHi 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.
March 7, 2017 at 5:05 pm #288549CraigHi 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
March 7, 2017 at 5:06 pm #288551LeoStaffCustomer SupportSo you inserted the image and it shows up below the menu? Can you show me the site?
March 7, 2017 at 5:18 pm #288561CraigHi 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.
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?
March 7, 2017 at 5:19 pm #288564Craig*edited
March 7, 2017 at 5:23 pm #288568TomLead DeveloperLead DeveloperYou 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 π
March 7, 2017 at 5:24 pm #288569LeoStaffCustomer SupportTry Dashboard > Appearance > GP Hooks and add this in the Before Header Content hook:
<img src="http://IMAGE-URL-HERE"/>
March 7, 2017 at 5:29 pm #288574CraigNailed 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 π
March 7, 2017 at 5:31 pm #288575LeoStaffCustomer SupportGlad we could help π
January 18, 2018 at 12:26 pm #474381PaulHi Tom,
How could I modify what you posted in reply #288568 so that it only affects the home page?
Paul
January 18, 2018 at 4:15 pm #474517LeoStaffCustomer SupportTry
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 ); } }
January 18, 2018 at 4:57 pm #474538PaulThanks, Leo. You rock! Will give it a try.
January 30, 2018 at 1:30 pm #483897drewLeo: 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?
January 30, 2018 at 4:43 pm #484036LeoStaffCustomer SupportNot sure what you mean? It’s a static image so you can just add it as many times as you want.
-
AuthorPosts
- You must be logged in to reply to this topic.