If installing the plugin from wordpress.org:
- Upload cmb2-conditionals.php file into plugin directory of your CMB2 Directory
- Create Admin Directory in CMB2 Plugin Directory
- Upload cmb2-conditionals.js file into Admin Directory
- Done
- Open your meta box file.
- Include cmb2-conditionals.php file on top.
if ( file_exists( dirname( __FILE__ ) . '/cmb2/plugins/cmb2-conditionals.php' ) ) {
require_once dirname( __FILE__ ) . '/cmb2/plugins/cmb2-conditionals.php';
cmb2_conditionals_init();
}
- Use Attribute to show / Hide Group Box based on Parent Group Field Value