[Support request] Mobile Off Canvas menu only on homepage

Home Forums Support [Support request] Mobile Off Canvas menu only on homepage

Home Forums Support Mobile Off Canvas menu only on homepage

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1138859
    Simon

    Hi guys, hope you are well and have had a good start to 2020!

    Just wanted to know the best way to achieve the below:-

    Mobile hamburger style menu on homepage only for desktop view (normal hamburger on mobile though).

    I just want to show the menu on the homage here https://www.westcountrygames.co.uk/

    Hope you can help.

    Thanks
    Simon

    #1139255
    David
    Staff
    Customer Support

    Hi there,

    is this in place of the normal Navigation or as well as ?

    #1139286
    Simon

    Hi David

    This will be the main source of navigation on desktop/tablet – only for the home page through. Navigation to be as it is currently on all the other pages.

    Mobile will a normal hamburger menu – as present currently on all pages, including the homepage.

    Hope this helps.

    Simon

    #1139348
    David
    Staff
    Customer Support

    You can use the Menu Options filter to enable the off canvas on the Desktop for just the Front Page:

    https://docs.generatepress.com/article/option_generate_menu_plus_settings/

    the Off Canvas requires its own Menu Assigned to it.
    Once thats done ill need to look at the site to provide some CSS to hide the standard navigation.

    #1297141
    Nemanja

    Hi guys,

    I need the same functionality, can you help, please?

    On desktop, the off-canvas menu needs to be only on homepage, while all other pages will use the regular menu.

    All mobile will use the mobile off-canvas menu as well.

    Two menus only, but desktop homepage needs to show the mobile one.

    Help, please?

    #1297299
    David
    Staff
    Customer Support

    Hi there,

    may be simpler to just force the Mobile Menu Breakpoint to a really high value using this php snippet:

    add_filter( 'generate_mobile_menu_media_query', function( $width ) {
        if ( is_front_page() ) {
            $width = '(max-width: 10000px)';
        }
        return $width;
    } );

    https://docs.generatepress.com/article/generate_mobile_menu_media_query/

    #1298315
    Nemanja

    That did it!

    Thanks!

    #1298916
    David
    Staff
    Customer Support

    You’re welcome

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