WordPress Page Excludes plugin support for Custom Post Types

September 11, 2012 | Bug Fixes, PHP, Time Savers, Troubleshooting, Wordpress | 0 comments

I have been using the Exclude Pages plugin for WordPress by simonwheatley for a couple of years. It was invaluable before the new wp_nav_menu stuff arrived and now I don’t use it so much but a few of my clients still do. The thing it doesn’t support out of the box is custom post types.

A client of mine uses the Optimizepress theme with the footer menu turned on and it will show all pages on the site unless they are excluded. This plugin works wonderfully for Optimizepress and i’m sure others normally until you add a custom post type and then it outputs that in the page menu as well. This plugin is wired nicely to work with custom post types but the meta box isn’t present in the edit pages. the following code snippet, when added to your functions.php file, will add it for the stated post type.. in this case ‘leads’

function sbep_admin_init() {
	add_meta_box('sb_ep_admin_meta_box', __( 'Exclude Pages', EP_TD ), 'ep_admin_sidebar_wp25', 'leads', 'side', 'low');

add_action( 'admin_init', 'sbep_admin_init' );

A Donate Button!



  1. Wordpress Page Excludes plugin support for Custom Post Types … | Scion Players - [...] more here: WordPress Page Excludes plugin support for Custom Post Types … This entry was posted in Wordpress Guide…

Submit a Comment

Your email address will not be published. Required fields are marked *

CommentLuv badge

Stay in touch!

Page Builder Cloud

Page Builder Cloud

A truly universal template library for WordPress Page Builders.

Page Builder Recommendation

Elementor Banner

We are BIG fans of the Elementor page builder. Give it a look!

About this site and Sean Barton

Picture of Sean
Sean Barton is a Freelance PHP Website Developer in Crewe, Cheshire. He is a Wordpress and CMS/Framework specialist and Co-Founder of Page Builder Cloud.
This site was set up in 2008 as a tutorial and scripting resource for the PHP language and Wordpress.
Find out more about Sean on the About Me page or use the Hire Me page to get in touch. For more information about Sean's work take a look at the Portfolio

Our Services

  • Wordpress plugin/theme development
  • Divi specialist
  • Ecommerce (Woocommerce, WPSC, Shopify, Magento)
  • PSD to Wordpress theme conversion (Responsive)
  • Website design work (Banners, Logos, Full Site, etc)
  • Website analysis (security, usability, SEO)
  • API Integrations (InfusionSoft, SalesForce, Ontraport, Customer Thermometer, etc..)
  • Wordpress consultancy & expert advice
  • Crisis support
  • Website hosting

The main services offered are Wordpress based although we do a great deal of technical programming for bespoke systems. From troubleshooting, extending frameworks, finding bugs to writing them from scratch.

Find out more by looking through our past projects or get a quote.

Be the first to hear about new products/updates!

This is a mailing list for those people interested in being told when we release a new product (Divi plugin or Theme).

We shall also use this list to let you know about product updates and releases.

You have Successfully Subscribed!