[Resolved] Different menu for mobile

Home Forums Support [Resolved] Different menu for mobile

Home Forums Support Different menu for mobile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2343462
    Anastasia

    Greetings everyone,

    I’d like to know if it’s possible to create a different menu for mobile.

    What I’ve done so far.

    I’ve put inside my functions.php file these two scripts in order to enable the option for Mobile Menu in WordPresse’s Menu Tab

    add_action( 'init', function() {
        register_nav_menu( 'mobile-menu', __( 'Mobile Menu' ) );
    } );
    
    add_filter( 'generate_mobile_header_theme_location', function() {
        return 'mobile-menu';
    } );

    I’ve created a new menu and named it “Mobile Menu” and checked the box for Mobile.

    Unfortunately though it doesn’t work since I can’t see any changes on the frontend and also while inspecting my page classes, and menu ids are of primary’s menu.

    #2343556
    David
    Staff
    Customer Support

    Hi there,

    do you have the Mobile Header enabled in Customizer > Layout > Header?

    #2343572
    Anastasia

    Oh that it was?!

    Thanks a lot David. Problem solved.

    #2343934
    David
    Staff
    Customer Support

    Glad to be of help 🙂

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