Comments samiranich started the conversationSeptember 12, 2019 at 2:03pmHi there,is there a way to use different menus for different pages?cheers,Sam* 7,123Oliver repliedSeptember 12, 2019 at 2:13pm Hi,here is the filter example for the child theme: function thegem_custom_wp_nav_menu_args($args) { if(in_array(get_the_ID(), array(11111))) { if($args['theme_location'] == 'primary') { $args['menu'] = 22222; } } return $args; } add_filter('wp_nav_menu_args', 'thegem_custom_wp_nav_menu_args'); 11111- page ID. 22222 - menu ID. Add this code to the functions.php of the child theme.Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliver1 Like Sign in to reply ...
Hi there,
is there a way to use different menus for different pages?
cheers,
Sam*
Hi,
here is the filter example for the child theme:
11111- page ID.
22222 - menu ID.
Add this code to the functions.php of the child theme.
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver