Custom menu fallback not working [wp_nav_menu fallback_cb]
-
I am using a custom field to dynamically associate sub-navigation menus with specific pages. This code works well, but it does not gracefully fallback to NO menu when no MenuName custom field exists, instead displaying the default menu.
I have tried both
'fallback_cb' => 'false'
and'fallback_cb' => ''
with no success. Any ideas?<?php wp_nav_menu( array( 'fallback_cb' => 'false', 'sort_column' => 'menu_order', 'menu' => get_post_meta($post->ID, 'MenuName', true), 'depth' => 2, 'container_class' => 'industries' ) ); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom menu fallback not working [wp_nav_menu fallback_cb]’ is closed to new replies.