As seasoned WordPress developers with years of hands-on experience, we frequently help bloggers create essential pages—like privacy policies or landing pages—without cluttering their navigation menus. This practical guide, inspired by a question from our Twitter community, walks you through the process.
WordPress menus are typically generated using the wp_list_pages() function, often found in sidebar.php or other theme files like header.php. Open your theme's file and locate this code:
wp_list_pages();
Replace it with:
wp_list_pages(array('exclude' => 'ID'));
Substitute 'ID' with your page's actual ID (find it in the Pages admin screen), and that page will vanish from the menu. For full details, check the WordPress Codex.
For a plugin-based alternative, try 'Exclude Pages'—ideal if you prefer avoiding code edits.
Got questions? Tweet us; we respond to every one 