How to show menu items only on selected pages or posts
Sometimes a menu link only makes sense in a specific part of the site. Location-based menu rules let you show or hide items depending on the page, post, or supported content area currently being viewed.
How to set it up
- Decide where the menu item should appear, such as a specific page or content area.
- Open the relevant menu item in Appearance > Menus.
- Add a page, post, or supported content location rule.
- Choose whether the item should show or hide when that location matches.
- Save the menu and visit the selected page plus a few unrelated pages to confirm the behavior.
