- This topic has 23 replies, 2 voices, and was last updated 2 years, 6 months ago by David.
-
AuthorPosts
-
September 25, 2021 at 1:01 pm #1942850Salim
Hi there,
I’m currently having an issue that I believe stems from using the navigation as a header.
I’m unable to disable the header in any element unless I untick “use navigation as header” in the customisation settings.
Is there a way to have navigation be the header except on the front page? I’m looking to implement an animated logo on the front page only, and none of the CSS I’ve searched for in your forums work, unless I disable it as a header.
Having navigation as a header is super useful and helped me achieve the design I wanted on mobile and it looks great across the site.
I’m wondering if there’s a CSS snippet or something I could use here.
Much appreciated
September 26, 2021 at 3:19 am #1943084DavidStaffCustomer SupportHi there,
Enable the Navigation as Header in the Customizer, and the you can use this PHP Snippet to disable it on the front page.
add_filter( 'option_generate_menu_plus_settings', function( $settings ) { if ( is_front_page() ) { $settings['navigation_as_header'] = 'false'; } return $settings; } );
September 26, 2021 at 4:03 am #1943108SalimThanks for your response!
I’ve added the snippet and also tried adding to the theme files, but unfortunately, it isn’t working. Any ideas?
September 26, 2021 at 4:26 am #1943128DavidStaffCustomer SupportWhere did you add the code exactly ? And are you using a Child Theme ?
September 26, 2021 at 4:29 am #1943129SalimI tried adding it to the code snippets plugin and also the theme itself. Neither worked. Not using a child theme (I know it’s risky but I only need one or two lines added).
September 26, 2021 at 4:37 am #1943134DavidStaffCustomer SupportHmmm… lets try the reverse logic. Disable the Navigation as Header option in the Customizer then try this PHP Snippet:
add_filter( 'option_generate_menu_plus_settings', function( $settings ) { if ( !is_front_page() ) { $settings['navigation_as_header'] = 'true'; } return $settings; } );
September 26, 2021 at 4:49 am #1943136SalimHmm, still not working. Any further ideas?
September 26, 2021 at 5:05 am #1943141SalimSo I have mobile menu enabled always, I got a CSS snippet through another support request and by searching through the forums. Would that affect things?
September 26, 2021 at 5:13 am #1943146DavidStaffCustomer SupportCan you share a link to the site ?
September 26, 2021 at 5:35 am #1943160SalimAdded to the private notes section.
September 26, 2021 at 6:49 am #1943193DavidStaffCustomer SupportDo you have the Navigation as Header still enabled in the Customizer ? If so can you disable it.
September 26, 2021 at 10:10 am #1943525SalimDisabled now.
September 26, 2021 at 2:24 pm #1943725DavidStaffCustomer SupportWhat other changes did you make ? Is the code i provided still active ?
As i on the front page i see neither the Site Header or the Navigation as Header.September 26, 2021 at 4:05 pm #1943754SalimI’ve been trying a ton of different things for hours now. I think I’ll try a new strategy. I’ve removed navigation as a header, which wouldn’t respond to your code. Is it possible to have the logo and site title hidden on the front page only?
Still though, when I disable the header, the primary navigation is taken out with it. And I just can’t figure out why.
September 26, 2021 at 4:12 pm #1943760SalimOk so I was able to add primary navigation ABOVE the header, but now it won’t sit on the right side. How can I achieve that? It’s a bit of a hack but it’s almost what I want if I can get the menu to float to the right above the header.
Also… I need to remove the site logo from the mobile menu on the front page only. Is that also possible? On another forum request I opened I was told this could be achieved through having the header be the navigation… Which caused the issues we’re discussing now
-
AuthorPosts
- You must be logged in to reply to this topic.