Archived topic
Some help with Hamburger Animation for Off Canvas Panel
3 replies · Started by Stacey on January 27, 2021
Hi I have 2 questions
1.
Is it possible to just show the hambuger menu with off canvas panel on desktop - just for the home page?
And then use the layout of navigation as header for all the other pages?
I want it to be like the page (link below) (which is built using a beaver builder module)
2.
I've followed the instructions on this page https://docs.generatepress.com/article/animated-hamburgers/
to add the animation for the hamburger menu on mobile
But the close icon is appearing behind the background of the off canvas panel and so you aren't seeing clearly to close it.
Can you help with any css that I might need to change?
thank you
Hi there,
You can try David's recommendation here:
https://generatepress.com/forums/topic/mobile-off-canvas-menu-only-on-homepage/#post-1139348
Thanks I've added in this code
add_filter( 'option_generate_menu_plus_settings','lh_custom_homepage_menu_plus_settings' );
function lh_custom_homepage_menu_plus_settings( $options ) {
if ( is_front_page() ) {
$options['mobile_menu_label'] = 'Home Page Toggle Text';
$options['slideout_menu'] = 'both';
$options['slideout_menu_side'] = 'left';
}
return $options;
}
But it still looks the same on the home page. Do I need to hide the other menu? It mentions something along those lines in the post you referred to
But it still looks the same on the home page. Do I need to hide the other menu? It mentions something along those lines in the post you referred to
After adding this PHP snippet, can you try turning the off-canvas menu "off" on Appearance > Customize > Layout > Off-Canvas Panel and check how it goes?
Let us know.