- This topic has 38 replies, 3 voices, and was last updated 3 years, 7 months ago by David.
-
AuthorPosts
-
September 21, 2020 at 3:30 pm #1453037Escobar
Now its in the generate_inside_secondary_navigation
September 21, 2020 at 3:57 pm #1453056LeoStaffCustomer SupportI see where the misunderstanding is coming from.
I think it would work better if the red is the primary navigation and green is the secondary navigation:
https://www.screencast.com/t/BFyMehfQrSo add the search field using the
generate_inside_navigation
hook start please.September 21, 2020 at 4:20 pm #1453073LeoStaffCustomer SupportSorry one more question before we move on.
Will you be using the sticky navigation?
If so we will need to go another direction.
September 21, 2020 at 4:24 pm #1453075LeoStaffCustomer SupportAnother update.
Using the header is definitely the better solution for this.
So add the search form using the
generate_after_header_content
hook like this:
https://www.screencast.com/t/Y5LIndq0dAnd make sure the navigation as a header option is disabled:
https://docs.generatepress.com/article/navigation-as-a-header/September 22, 2020 at 12:22 am #1453359EscobarDone search form using the generate_after_header_content hook.
what do I do now?September 22, 2020 at 5:19 am #1453661DavidStaffCustomer SupportHi there,
So the menu items you want aside the Search bar keep them assigned to the Primary Navigation.
All other menu items can you add them to a separate menu and assign this to the Secondary Navigation.Now set the Customizer > Layout > Primary Navigation –> Location to Float Right.
And set the Secondary Navigation to Below Header.Once thats done we can look at the CSS to align the Logo | Search | Menu items
September 22, 2020 at 5:58 am #1453719EscobarHi,
I would like, in anticipation of how it will look in the mobile version, for the search bar to be in the center of the secondary menu, with the logo on the left side and the shopping cart and login on the right, and the main menu would stay as is (without the logo).
But if to do this it is easier to change the main menu to the secondary one, we can try it.September 22, 2020 at 6:04 am #1453728DavidStaffCustomer SupportAlthough we can move the cart and the logo to the secondary navigation it will create further work and potential issues.
For mobile we would suggest you use the Off Canvas panel, then edit your Secondary menu and set its locations to Secondary and Off Canvas Panel.
We can then simply hide the secondary nav on mobile to give you the layout you require.
September 22, 2020 at 7:15 am #1453802EscobarAll done, but it looks really bad, I hope you help me to the end
September 22, 2020 at 8:24 am #1454017DavidStaffCustomer SupportOK – so lets start with this CSS:
.inside-header .main-navigation { flex: 1; } .inside-header, .inside-navigation { display: flex; align-items: center; } .inside-navigation .woo-search { margin: 0 auto; } @media(max-width: 768px) { #secondary-navigation { display: none; } }
Then disable the Mobile Header in Customizer > Layout > Header.
Once thats done we can see what else needs to be done for Mobile.
September 22, 2020 at 9:34 am #1454135EscobarYou’re great. It looks almost like what I wanted, but I think the search bar is too small, it does not occupy all the space between the logo and the cart.
It also seems that the registration-login item, which was in the main menu next to the cart, does not appear in the mobile version.In addition, it is curious that the secondary menu appears centered on the mobile and tablet version but not on the desktop version
September 22, 2020 at 11:11 am #1454262LeoStaffCustomer SupportLet’s tackle one thing at the time.
Try edit this:
.inside-navigation .woo-search { margin: 0 auto; }
to this:
.inside-navigation .woo-search { margin: 0 20px; display: flex; flex-grow: 1; }
Then add this:
.aws-container { width: 100%; }
September 22, 2020 at 11:33 am #1454309EscobarYou’re great!!!
Now it looks perfect in the desktop version, but I can’t get to center the secondary menu below the search bar.In the mobile version, I see a problem, I don’t know why the register-login item doesn’t appear in the main menu next to the cart, and the logo is too close to the search bar.
September 22, 2020 at 7:08 pm #1454655LeoStaffCustomer SupportAny chance you can open two topics for the two separate issues now we have the search bar issue resolved?
Please remember to clear and disable your caching plugin we are trying to assist as well.
Thank you 🙂
September 22, 2020 at 11:12 pm #1454768EscobarI do not mind opening another separate topic but we should solve that when we put the search bar like this, an element of the menu that is not seen in the mobile version has disappeared and the secondary menu does not stay in the center in the desktop version.
-
AuthorPosts
- You must be logged in to reply to this topic.