Support » Requests and Feedback » Request: Better way to exclude pages from navigation menu?
7 years, 5 months ago
Currently, I’m using the “exclude=” parameter to exclude certain pages from my main menu.
But it’s tedious having to go into my code each time I want to exclude a page.
The perfect solution would be to have an option on page creation, where I can choose if a page should be visible or not in page listings (menus).
So my questions are:
1. Changing core functionality in WP is never a good idea, and it’s always lost anyway when I upgrade. So how could I implement such a feature?
2. Has the wordpress team any plans on installing such a feature?
A work around would be to use the authors= argument with the template tag, wp_list_pages().
So you would write the pages that are to be excluded as a ‘different’ author that is not specified in your ‘authors’ argument.
The Exclude Pages plugin has an option to add a check box in Page Edit screens. It is ticked by default (which means: include in menus) and you can untick it for selected pages: