Tagged: mobile menu
-
AuthorPosts
-
December 3, 2019 at 9:26 am #1162109
Hi,
is it possible to show the top menu also in the mobile menu?
I know there is a option to build an seperated mobile menu. The problem is that the desktop menu gets also loaded in the mobile source code and all the links are doubled. In our opinion this isn’t the best for seo.
So is there a way to have the menu full responsive without coding it manually?
Thanks in advance
SebastianDecember 5, 2019 at 3:48 pm #1163034Hey,
Sorry for the late reply!
Could you please elaborate on the changes you would like to make? Screenshots and a link to your website would help. You can upload your screenshots on imgur.com or Dropbox public folder and post the links here :)
Best regards,
YigitDecember 5, 2019 at 4:00 pm #1163039Hey,
we’re more and more often facing the problem that we have to include the menu links we’re using in the top menu also into the main menu to show them in mobile menu.
Is there a workaround to merge those tow menus on mobile devices?
If we’re building a seperate mobile menu the desktop menu gets also loaded on moblie deviced and we have doubled links in sourcecode.
We’re actually moving the top menu via jQuery to the mobile menu. We guess this isn’t the cleanest solution.
I hope that was understandable.
Regards,
SebastianDecember 5, 2019 at 4:12 pm #1163048Hi,
You can try creating a new menu for mobile version with all menu items you would like to display in mobile menu and add following code to Functions.php file in Appearance > Editor and display different menu on mobile
function av_different_mobile_menu( $args = '' ) { if($args['menu_id'] == 'avia-menu') { if(wp_is_mobile()) { $args['menu'] = 'main-menu-mobile'; } else { $args['menu'] = 'main-menu'; } } return $args; } add_filter( 'wp_nav_menu_args', 'av_different_mobile_menu' );
Please make sure to replace menu names (“main-menu” and “main-menu-mobile”) in the code to match the name of your menus
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.