I’m using the built in menu manager to create my menues and I disaply them by using wp_nav_menu()
.
I’m wondering, is it possible to remove certain menu items from being displayed based on some specific condition?
I’m using the built in menu manager to create my menues and I disaply them by using wp_nav_menu()
.
I’m wondering, is it possible to remove certain menu items from being displayed based on some specific condition?
Use the wp_nav_menu_objects filter to adjust the menu items using whatever conditions you like. The filter will receive and return an array of the menu items.