- This topic has 17 replies, 4 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
March 30, 2023 at 8:35 am #2589066
Jusung
I am trying to use stiky menu but it is not working.
My menu is a little bit complicated.
I have primary menu and secondary meny on desktop.
On mobile, I hide those 2 menu and show off canvas menu.I just set the sticky menu on, but it is not working.
Can I just show the same menu as the sticky menu?
March 30, 2023 at 10:18 am #2589243Ying
StaffCustomer SupportHi Jusung,
Your sticky menu is working, but as your navigation HTML structure is a bit different, it’s not working well.
Try adding this CSS:
nav#sticky-navigation { height: 50px; display: flex; }March 30, 2023 at 5:38 pm #2589677Jusung
Can I have the same sticky menu with the original one?
Like, I can’t see the secondary menu.
March 30, 2023 at 6:07 pm #2589697Fernando Customer Support
The Sticky menu is working for me on Desktop view. To clarify, are you wanting it to work on Mobile as well?
Do you want the Secondary menu to be sticky as well?
March 30, 2023 at 8:02 pm #2589791Jusung
Yes. It should work on mobile as well.
Also, there should be secondary menu on the sticky menu.Primary menu on right side and secondray menu on left side.
March 30, 2023 at 8:14 pm #2589799Fernando Customer Support
Do you already have it set to
Onon Appearance > Customize > Layout > Sticky Navigation?March 30, 2023 at 8:26 pm #2589802Jusung
Yes. It is on and I just added this code.
nav#sticky-navigation {
height: 50px;
display: flex;
}March 30, 2023 at 8:40 pm #2589804Fernando Customer Support
It’s not working from my end. Is it working from your end?
March 30, 2023 at 9:10 pm #2589829Jusung
Sorry. I don’t understand.
I can only see primary menu on the center.
I want to see primary and secondary menu there.March 30, 2023 at 9:49 pm #2589848Fernando Customer Support
For reference, can you share a screenshot of what you’re seeing?
Uploading Screenshots: https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
March 30, 2023 at 9:50 pm #2589851Jusung
This is what I see and this is way different from my menu.
March 30, 2023 at 10:00 pm #2589857Fernando Customer Support
I see. If that’s what you’re looking for, you’ll need to hook the Secondary Nav
generate_inside_navigation.Create a Hook Element with this code:
<?php if (function_exists('has_nav_menu') && has_nav_menu('secondary')) { generate_secondary_navigation_position(); } ?>Hook it to
generate_inside_navigation.April 1, 2023 at 2:07 am #2591727Jusung
It works. It makes the secondary menu on sticky menu.
However, it also make another secondary menu on original menu.
So, there are 2 secondary menu on original menu..Is there a way to make this by adding CSS?
April 2, 2023 at 6:42 am #2592985David
StaffCustomer SupportHi there,
why not use a single navigation on mobile ?
We can style the first lot of menu items differently using CSS.April 2, 2023 at 8:28 am #2593289Jusung
I don’t understand.
I am just trying to make stikcy menu.
The mobile menu has to be off canvas so that I can include all the menu I want.The reason stikcy menu not working is beacause of off canvas menu..?
-
AuthorPosts
- You must be logged in to reply to this topic.