[Support request] Mobile Header Layout

Home Forums Support [Support request] Mobile Header Layout

Home Forums Support Mobile Header Layout

Viewing 15 posts - 31 through 45 (of 53 total)
  • Author
    Posts
  • #1334362
    Tom
    Lead Developer
    Lead 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.

    #1334376
    Ash

    Emailed 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.

    #1334747
    Tom
    Lead Developer
    Lead Developer

    Does the issue go away if you temporarily deactivate the cart icon? What about the search feature?

    #1335089
    Ash

    Cart disabled https://ibb.co/Cbj1ZzM

    Activated again
    Mobile – https://ibb.co/rsHRr0z
    Desktop – https://ibb.co/NSk4zry

    Menu shifting even doing it on desktop which doesnt have the search icon.

    But tbf disabling either stops shift on mobile.

    #1335564
    Tom
    Lead Developer
    Lead Developer

    Yea, 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;
    }
    #1336993
    Ash

    Unfortunately 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?

    #1337738
    Tom
    Lead Developer
    Lead Developer

    You 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.

    #1338414
    Ash

    Thanks 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

    #1339075
    Tom
    Lead Developer
    Lead Developer

    I’m still seeing it inside the header – not in the secondary nav. Are you still working on staging?

    #1339085
    Ash

    Yes staging. Its hidden on desktop it should show in secondary menu on mobile/desktop

    #1339485
    Tom
    Lead Developer
    Lead Developer

    Ah 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;
        }
    }
    #1339801
    Ash

    Perfect 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

    #1340517
    Tom
    Lead Developer
    Lead Developer

    To 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

    #1340535
    Ash

    Thanks Tom, how come menu items are floated to the right?

    #1340739
    Tom
    Lead Developer
    Lead Developer
Viewing 15 posts - 31 through 45 (of 53 total)
  • You must be logged in to reply to this topic.