Plugin to relate fields in a CMB2 metabox
PHP JavaScript
Latest commit 57aab8d Aug 25, 2016 @jcchavezs committed on GitHub Merge pull request #32 from jrfnl/feature/phpcompatibility-and-codestyle
Minor automated testing tweaks.

CMB2 Conditionals

Join the chat at Total Downloads License

Contributors: jcchavezs
Tags: cmb2, conditionals, metaboxes
Requires at least: 3.8.0
Tested up to: 4.3
Stable tag: 1.0.4
License: GPLv2 or later
License URI:


CMB2 Conditionals is a plugin for CMB2 which allows developers to relate fields so one of them could only appear when one other have an specific value or when is not empty.

Download plugin on

To get started, please follow the examples in the included example-functions.php file.


  • PHP 5.2.4+
  • Wordpress 3.8+
  • CMB2


All contributions welcome. If you would like to submit a pull request, please check out the master branch and pull request against it. Please read the CONTRIBUTING doc for more details.

A complete list of all our awesome contributors found here:


If installing the plugin from

  1. Upload the entire /cmb2-conditionals directory to the /wp-content/plugins/ directory.
  2. Activate CMB2 Conditionals through the 'Plugins' menu in WordPress.
  3. Copy (and rename if desired) example-functions.php into to your theme or plugin's directory.
  4. Edit to only include the fields you need and rename the functions.
  5. Profit.