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?

3 Answers
3

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.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *