Meta Box Include Exclude

When creating meta boxes for your websites with the Meta Box plugin, sometimes we want to show/hide these meta boxes only in some situations conditionally. For example a meta box for the Contact Us page template only or a meta box for only posts under News category, etc. Each post under these conditions has specific meta data and thus, specific meta box for configuration.

Meta Box Include Exclude is an extension for the Meta Box plugin, which helps you to show/hide meta boxes by post ID, page template, category, tag or custom taxonomy. You can combine conditions (include, exclude, logical operator AND, OR) to create as many as restrictions as you want. You can also write a custom function to check whether or not show the meta box.

This extension shows/hides meta boxes when page loads or after saving. It does not include Javascript code to toggle meta boxes immediately when conditions changed. For that purpose, please see the Meta Box Show Hide (Javascript) extension.


  • Allow to show (include) or hide (exclude) meta boxes under conditions
  • You can combine conditions using logical operator AND, OR
  • Conditions (show/hide by):
    • Post IDs
    • Parent IDs
    • Post slugs
    • Page Templates
    • Categories
    • Tags
    • Custom taxonomies
    • Parent categories
    • Parent tags
    • Parent custom taxonomies
    • User roles
    • User IDs
    • Custom function

The plugin is easy to use: you don’t have to rewrite all the meta box definitions. All you need to do is just add conditions for meta boxes, the plugin will handle that for you automatically. No need to get stuck with writing custom PHP to check whether or not show/hide meta boxes. Everything is ready for you to use, enjoy it!


Meta Box Include Exclude
Meta Box Include Exclude Screenshot

Version 1.0.5 - August 3rd, 2016:

  • Fix: "category" param doesn't work.

Version 1.0.4 - June 1st, 2016:

  • Improvement: Make the extension safe to be included in themes/plugins.

Version 1.0.3 - May 8th, 2016:

  • Fix: Check "is_child()" no longer outputs warning for new posts

Version 1.0.2 - April 23rd, 2016:

  • Fix: Do not access global variable of current user

Version 1.0.1 - March 23rd, 2016:

  • Improvement: Add support for custom function to be an array(object/class, method name)

Version 1.0.0 - March 21st, 2016:

  • Improvement: Add support for checking parent terms

Version 0.2.4 - November 9th, 2015:

  • Fix: wrong initial value for 'AND' relation

Version 0.2.3 - June 23rd, 2015:

  • New: Add support for checking if a page is a child page or not (via is_child parameter)

Version 0.2.2 - April 16th, 2015:

  • Fix: E-NOTICE warning when visit other admin pages

Version 0.2.1 - April 8th, 2015:

  • Fix: Missing post ID when checking by post slug

Version 0.2.0 - March 17th, 2015:

  • New: Add support for user role (via user_role parameter)
  • New: Add support for user ID (via user_id parameter)

Version 0.1.3 - March 7th, 2015:

  • Fix: Not working when passing comma separated string for parameters

Version 0.1.2 - December 20th, 2014:

  • Fix: Not working for "page" parent
  • Improvement: optimize plugin loading file

Version 0.1.1 - August 31st, 2014:

  • Change classname and improve coding style
  • Add parent IDs and post slugs to list of conditions

Version 0.1 - July 3rd, 2014:

  • First release

You should use Meta Box Include Exclude with:

Save > 70% when buy all extensions with Core Extension Bundle!

Get all CURRENT+FUTURE extensions and save > 50%! Check it out