Site logo

[Resolved] Remove hamburger menu (mobile)

Home Forums Support [Resolved] Remove hamburger menu (mobile)

Home Forums Support Remove hamburger menu (mobile)

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2036656
    russel

    I want to remove the hamburger menu on mobile and place all the categories directly.

    how can I do that?

    #2036662
    Elvin
    Staff
    Customer Support

    Hi there,

    Go to Appearance > Customize > Layout > Primary navigation and change the Mobile Menu Breakpoint value to 0px.

    And then, if you want to replace the menu on mobile, you can do it with this PHP snippet:

    add_filter( 'wp_nav_menu_args', function ( $args ) {
        if ( 'primary' === $args['theme_location'] ) {
            if ( wp_is_mobile() ) {
                $args['menu'] = 'Your Menu name for mobile';
            } 
        }
        return $args;
    } );

    Change Your Menu name for mobile to the name of the menu you’re going to use for mobile. ๐Ÿ˜€

    #2036702
    russel

    thank you ๐Ÿ™‚

    how to reposition the menu (mobile)? I want to make it look like this:

    Moved to private section

    #2036706
    Elvin
    Staff
    Customer Support

    how to reposition the menu (mobile)? I want to make it look like this:

    Did you include an image? It didn’t seem to get added into the reply.

    You can use image sharing sites we’ve recommended here – https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots – to share your images. ๐Ÿ™‚

    #2036708
    russel

    I forgot to mention that i need to remove the search function on mobile to achieve this look

    #2036725
    Elvin
    Staff
    Customer Support

    The search icon can be removed through Appearance > Customize > Layout > Primary navigation as well.

    In this setting, you should see this – https://share.getcloudapp.com/04u5jK1N . Set it to “Disable” to remove the search function.

    As for the repositioning: it should align similar to the screenshot provided once the search icon is removed as it space will free up for it to look similar. ๐Ÿ˜€

    #2036747
    russel

    After tinkering a bit, I Got it working thanks! ๐Ÿ™‚

    I’ll ask it here since it is relayed on menu navigation.

    I also want to add a menu on the footer, mainly for the privacy policy and contact page.

    How can I do that?

    #2036750
    Elvin
    Staff
    Customer Support

    I also want to add a menu on the footer, mainly for the privacy policy and contact page.

    How can I do that?

    There are different ways of doing that.

    One way of doing it is to add a Navigation menu block in one of the Footer widget areas on Appearance > Widgets.

    Another way is by making your own footer layout by creating a Block Element – Site footer. https://share.getcloudapp.com/9ZuR1AKe

    #2036783
    russel

    One way of doing it is to add a Navigation menu block in one of the Footer widget areas on Appearance > Widgets.

    The pages are shown as columns, how to make it a row?

    #2036785
    Elvin
    Staff
    Customer Support

    Try adding this CSS:

    aside#block-10 ul {
        display: flex;
    }
    
    aside#block-10 ul li:not(:last-child) {
        margin-right: 12px;
    }

    You can adjust the spacing between them by changing the margin-right value. ๐Ÿ™‚

    #2036789
    russel

    It works now! thank you!

    Last question, how can I change the order of the menu?

    I want the “privacy policy” to be the first in row for example

    #2036793
    Elvin
    Staff
    Customer Support

    You can change the order of the menu on Appearance > Menu.

    Select the menu you’ve used on the footer and change it’s sorting order from there. ๐Ÿ˜€
    (Place Privacy Policy on the top of the list so it goes first)

    #2036802
    russel

    Thanks!

    #2039493
    Elvin
    Staff
    Customer Support

    No problem. ๐Ÿ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.