- This topic has 52 replies, 5 voices, and was last updated 2 years, 8 months ago by Elvin.
-
AuthorPosts
-
June 19, 2020 at 9:36 am #1334362TomLead DeveloperLead Developer
Hmm, that’s likely due to the search plugin initializing. It might be worth checking with their developers if there’s a way to hide it until it’s fully loaded.
June 19, 2020 at 9:49 am #1334376AshEmailed them 2 weeks ago about something else they never responded.
Looking at the screenshot it looks like it’s the cart icon that moves about, search icon doesn’t show straight away as it is same on desktop.
Top menu also creates shift but not always.
June 19, 2020 at 2:53 pm #1334747TomLead DeveloperLead DeveloperDoes the issue go away if you temporarily deactivate the cart icon? What about the search feature?
June 20, 2020 at 2:15 am #1335089AshCart disabled https://ibb.co/Cbj1ZzM
Activated again
Mobile – https://ibb.co/rsHRr0z
Desktop – https://ibb.co/NSk4zryMenu shifting even doing it on desktop which doesnt have the search icon.
But tbf disabling either stops shift on mobile.
June 20, 2020 at 9:48 am #1335564TomLead DeveloperLead DeveloperYea, I’m 99% sure it’s the search box that would conflict with any kind of content next to it.
You could try hiding it until it’s loaded:
.dgwt-wcas-search-wrapp { display: none; } .dgwt-wcas-layout-icon-flexible-loaded { display: block; }
June 22, 2020 at 1:10 am #1336993AshUnfortunately not, will come back to this one when it’s on our live server.
Going to be a pain, I’ve decided I want the Login/Register hook in the top bar menu on mobile, how can I accomplish this?
June 22, 2020 at 9:35 am #1337738TomLead DeveloperLead DeveloperYou would need to hook them into the
generate_inside_secondary_navigation
hook, and then you’d need to give it custom CSS so it matched the other links in the navigation.It may be easier to find a plugin that provides a login/logout link as a menu item, then add the menu item to the Secondary Nav.
June 23, 2020 at 2:48 am #1338414AshThanks Tom,
I have changed the hook, any help with the css.
Apologies, I know there is a plugin for this but I have had to add quite a few extra plugins moving over to gp
June 23, 2020 at 9:39 am #1339075TomLead DeveloperLead DeveloperI’m still seeing it inside the header – not in the secondary nav. Are you still working on staging?
June 23, 2020 at 9:51 am #1339085AshYes staging. Its hidden on desktop it should show in secondary menu on mobile/desktop
June 23, 2020 at 3:52 pm #1339485TomLead DeveloperLead DeveloperAh I see it, sorry about that.
So instead of this:
<div class="hide-on-desktop"> ... </div>
Do this:
<div class="hide-on-desktop mobile-account-links"> ... </div>
Then add this CSS:
@media (max-width: 768px) { .secondary-navigation .inside-navigation { display: flex; align-items: center; flex-wrap: wrap; } .secondary-navigation .main-nav { flex-basis: 100%; order: 3; } .secondary-navigation .mobile-account-links { order: 2; padding-right: 10px; font-size: 14px; } .secondary-navigation .mobile-account-links a { color: #fff; } .secondary-navigation .menu-toggle { text-align: left; flex-grow: 1; width: auto; } }
June 24, 2020 at 12:52 am #1339801AshPerfect thank you. Does it have to show when secondary is toggled? Also secondary menu items are being pushed to the right
Sorry I’m being a pain, good news I have nearly finished the site lol
June 24, 2020 at 10:05 am #1340517TomLead DeveloperLead DeveloperTo hide it when toggled, add this:
.secondary-navigation.toggled .mobile-account-links { display: none; }
I’ve adjusted the CSS above to fix the pushing issue: https://generatepress.com/forums/topic/mobile-header-layout/page/3/#post-1339485
June 24, 2020 at 10:14 am #1340535AshThanks Tom, how come menu items are floated to the right?
June 24, 2020 at 2:33 pm #1340739TomLead DeveloperLead DeveloperAdding the updated CSS above should fix that: https://generatepress.com/forums/topic/mobile-header-layout/page/3/#post-1339485
-
AuthorPosts
- You must be logged in to reply to this topic.