Tag Info

Hot answers tagged

1

As recommended in a similar post: http://wordpress.stackexchange.com/a/156494/74343 1.) Create the menus as you want them, and name them as you like, as an example "mobile-menu" and "desktop-menu". 2.) In your child theme in the header.php you could switch according to the wp_is_mobile() flag like this: if ( wp_is_mobile() ) { wp_nav_menu( array( ...


1

You are not providing the correct parameter to wp_get_nav_menu_object() function. It needs the menu ID or menu slug but you are providing the menu theme location. Obviously, I can not tell you what is the ID or slug of your menu. One way of getting the menu ID of the menu assigned to theme location is using get_nav_menu_locations(): $menu = ...



Only top voted, non community-wiki answers of a minimum length are eligible