The MB Include Exclude extension for Meta Box is a server-side visibility tool that allows developers to control exactly where and for whom meta boxes appear. Unlike Javascript-based toggles (like MB Show Hide), this extension works when the page loads or upon saving, making it ideal for streamlining the backend without the overhead of real-time scripts.
This is EXACTLY the same product as distributed by the developer. Sales Page
Core Technical Specifications
| Feature | Specification |
| Logic Engine | PHP-based (server-side check during page load/save) |
| Relation Operators | AND, OR (Case insensitive) |
| Execution | Filter-based via rwmb_meta_boxes |
| Compatibility | Requires (Free) |
| License | GNU GPL v2+ |
Available Conditions
You can target meta box visibility using several parameters. Each can be applied as an include (show only if) or exclude (hide if) rule.
-
Post Details:
ID,parent,slug,is_child(boolean). -
Templates:
template(Page template file names). -
Taxonomies:
category,tag, or any customtaxonomy(supports IDs, names, or slugs). -
User Roles:
user_role(Requires MB User Meta for profile screens). -
Custom Logic:
custom(Accepts a string representing a custom PHP function name for bespoke logic).
Implementation Example
In your code, you add an include or exclude key to your meta box configuration array.
Key Limitations & Distinctions
-
No Live Toggling: This extension does not hide/show fields instantly when you change a category or template in the editor. For real-time interactivity, you need MB Show Hide or MB Conditional Logic.
-
Server-Side: Because it runs on the server, it is highly secure for sensitive data fields that shouldn’t even be rendered in the HTML source if conditions aren’t met.
-
Modular: It can be used as a standalone extension or as part of the Meta Box AIO bundle.
- Categories: WordPress Plugins
- Tags: Meta Box
