- This topic has 16 replies, 5 voices, and was last updated 4 years, 5 months ago by Tom.
-
AuthorPosts
-
July 28, 2019 at 3:12 pm #969574Vajra
Hi,
I have been trying to create a front page like twenty seventeen. I can make the home page cover the full screen using the premium header option. But I can’t get the menu on the bottom of the header, not the footer. I want the menu on the bottom of the header image, with the site name just above it, parallax as you scroll down on the header image, with the menu sticking at the top. I have spent 3 days on this! Be great if you can help?
VaraJuly 28, 2019 at 5:56 pm #969622LeoStaffCustomer SupportHi there,
Can you give this PHP snippet a shot?
https://generatepress.com/forums/topic/page-header-image-above-menu/#post-288568Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know if this helps 🙂
July 29, 2019 at 9:18 am #970279VajraHi Leo,
Thanks for the quick response. But the code puts the menu just below the fold and also includes a hamburger menu at the end like the “Head On” template that I tried earlier?
VajraJuly 29, 2019 at 9:47 am #970298VajraHi Leo,
I also have the mobile header logo from the “Head On” template that I tried earlier, how do I remove it?
VajraJuly 29, 2019 at 4:13 pm #970541LeoStaffCustomer SupportHave you figured this out?
I no longer see a mobile header logo and a toggle on desktop.
Let me know 🙂
July 29, 2019 at 7:11 pm #970636VajraI managed to hide the mobile logo.
1. In mobile menu goes to “Head On” off-menu a template that I tried earlier not the primary menu?
2. The menu is at the bottom of every page and I only want the on the bottom of the home page.
Vajra
July 29, 2019 at 8:02 pm #970667LeoStaffCustomer Support1. Is this the issue?
https://docs.generatepress.com/article/off-canvas-panel-overview/#empty-off-canvas-navigation2. Try this instead:
add_action( 'after_setup_theme','lh_move_home_navigation' ); function lh_move_home_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 ); } }
July 29, 2019 at 10:02 pm #970704Vajra1. The menu is back at the top on every page.
2. Mobile menu goes to off-canvas-menu from “Head On” template that I tried earlier. Not the primary menu?
Vajra
July 30, 2019 at 6:54 am #970982VajraHi Leo,
I have been thinking, how about keep the main menu at the top and use the secondary menu for the front page only?
VajraJuly 30, 2019 at 6:55 am #970986DavidStaffCustomer SupportHi there,
try this function that will apply to every page on the site to move the navigation below the header element:
add_action( 'after_setup_theme','lh_move_home_navigation' ); function lh_move_home_navigation() { remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 ); add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 ); }
For the mobile nav, you can either disable the Off Canvas Panel in Customizer > Layout > Off Canvas Panel or set the your Primary Navigation Menus location to include the off canvas panel.
July 30, 2019 at 7:25 am #971004VajraHi Leo,
I’m sorry if I’m not being clear but I want the menu at the menu on the bottom of the header image, with the site name just above it, parallax as you scroll down on the header image, with the menu sticking at the top FRONT page only. All other pages at the top.
VajraJuly 30, 2019 at 2:40 pm #971544VajraHi Leo,
Lots of messing about all day!
I just want the FRONT page to have a menu below the featured image.
All other pages menus at the top.
VajraJuly 30, 2019 at 4:51 pm #971651TomLead DeveloperLead DeveloperWhich function are you using to move the navigation right now? We can tweak it so it only applies to the home page.
Other than that, it looks like you’re close.
I would replace this CSS:
.home .page-hero { min-height: 95vh !important; }
With this:
.home .page-hero { min-height: calc(100vh - 60px); /* 60px is height of your nav */ } body { overflow-x: hidden; }
July 31, 2019 at 8:43 pm #972669VajraI have managed to do it using the secondary menu. I will clean it up when back at work next week after a long weekend on cape cod.
Thanks for all your help.
Vajra
https://schalkenbach.org/file-1/August 1, 2019 at 9:13 am #973185TomLead DeveloperLead DeveloperNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.