Is it possible to conditionally display a menu based on whether the current page is present in the menu?
Leave a Reply
You must be logged in to post a comment.
Is it possible to conditionally display a menu based on whether the current page is present in the menu?
You must be logged in to post a comment.
You can use the following code. Loop through every item, in every menu, and check if the item exists. If it does, display the menu and move on to the next menu.
All relevant WordPress functions usage can be found in the codex, or via Google Search.