Archived topic
Page header image above menu
26 replies · Started by Craig on March 7, 2017
You beat me to the punch, I was just popping in to say I think I just figured out an easier way to do it entirely with CSS so no worries :)
Awesome :)
Hi Leo,
Thanks for your help. That snippet did the trick as you can see at Fourway.michianait.net.
I am surprised that something seemingly as basic as positioning the nav menu take extra code to implement. I would have thought that this was a very common scenario.
Mark
Hi Mark,
This has definitely been an increasingly popular layout people want.
I was actually thinking about mentioning to Tom the other day.
Will see if we can add this in the future.
Thanks for the suggestion!
Hi.
I have been trying to achieve the header image above the navigation as per the above instructions.
I have added the code snippets plugin and pasted the following code:
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 );
}
}
It doesn't seem to be working - any ideas what i am doing wrong?
The page in question is:
ph.konstructstudios.co.uk
Many thanks in advance.
Lee
Hi Lee,
try the code Tom provides here:
https://generatepress.com/forums/topic/page-header-image-above-menu/#post-288568
Hi David.
Thanks for the reply - i used the code i did as that was only to affect the home page header. I think the code on reply #288568 was site-wide?
Kind regards.
Lee
Hi Lee, that is correct, the other code will apply to only the home page if you have set it as your home page in the WordPress > Settings > Reading.
Hi Support Team. I'm trying to set the nav below my header. the snippet is not working out of some reason. If i choose in customizer layout>navigation>position below header , nothing is happening. what am i doing wrong?
Thanks a lot
Hi there,
Can you open a new topic and link me to the site in question?
Thanks!
This worked a charm. Thank you for all the support and docs - it's an education in Wordpress
No problem :)