WordPress.org

Plugin Reviews

Exclude Pages

This plugin adds a checkbox, “include this page in menus”, uncheck this to exclude pages from the page navigation that users see on your site.

42 reviews
Average Rating
4.9 out of 5 stars
Works perfect in 4.4
By , for WP 4.4

For me this plugin works perfect for hiding pages from the menus. I use the theme Twenty Fourteen.

Works with 4.4
By ,

Thanks a lot.

Works as described
By , for WP 4.3.1

Yep, the plugin works as expected on WP 4.3.1

What would be nice would be a "global config" setting where we could select either:

All pages/posts excluded as default OR
All pages/posts included as default

So for those of us who are creating a lot of content on a website that can really clog up a Pages widget with unnecessary links.

But if we could exclude all posts/pages as default, then we'd only have to select the handful of pages/posts we want displayed in menus and widgets and everything else would be hidden - a real timesaver.

NOTE FOR THE DEVELOPER: If you're not able or willing to add this modification, I'll be happy to get it done. Just reply to let me know.

Making it work with Sidebar.php
By , for WP 4.2.2

The plugin works great for the default WP navigation menu features. On one of my sites, WP takes care of the menus, but the sidebar.php file is customized and the plug-in needed to be manually integrated into it.

If you are using a custom sidebar.php file, you can use the following snippets to filter out the excluded IDs.

$excluded_ids_arr = ep_get_excluded_ids(); // get an array of IDs that are excluded using the Exclude Pages plug-in ep_get_excluded_ids() function.

$excluded_ids = implode(",",$excluded_ids_arr); // get a string of comma separate IDs

Anywhere you call wp_list_pages, you can exclude pages as follows:
$myPosts = wp_list_pages(array('exclude'=>$excluded_ids,'echo'=>0));
I have more members in the parameter array but am keeping it brief here for simplicity.

If you are using get_children(), you will need to loop through the list of child posts and skip any of the excluded IDs. Here is a snippet to better explain:
$parent_child_posts = get_children(array('post_status'=>'publish', 'orderby'=>'menu_order', 'order'=>ASC, 'post_parent'=>$post->post_parent));

foreach ( $parent_child_posts as $parentChildPost )
{
   // skip excluded IDs
   if ( in_array($parentChildPost->ID, $excluded_ids_arr) )
   {
      continue;
   }
   ... more code that does something with the included IDs ..
}
Works Great!
By , for WP 4.2.2

Even though this plugin hasn't been updated for 3 years, it works great!

Still Working
By , for WP 4.2.2

For some reason menus couldn't be excluded on my site page. Still works.If you're here this is what you're looking for!

still makes sense
By ,

very happy with this one

Work Perfect
By ,

Work Perfect

Works Just Fine
By , for WP 4.1.1

Exactly what I needed.

is now being replaced by "Menus", yet very effective with large sites
By ,

this is one plugin makes it so easy to decide whether or not the pages are by default included in the menu or not, although, recently we've had the "menus" functionality where in you can define pages and include/exclude pages as you want, as part of the core!

You must log in to submit a review. You can also log in or register using the form near the top of this page.