PHPackages                             wpsmith/cmb2-conditionals - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wpsmith/cmb2-conditionals

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

wpsmith/cmb2-conditionals
=========================

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.

1.0.5(9y ago)049GPL-2.0+PHP &gt;5.2.4

Since Dec 18Compare

[ Source](https://github.com/wpsmith/cmb2-conditionals)[ Packagist](https://packagist.org/packages/wpsmith/cmb2-conditionals)[ Docs](https://github.com/wpsmith/cmb2-conditionals)[ RSS](/packages/wpsmith-cmb2-conditionals/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (1)Versions (2)Used By (0)

CMB2 Conditionals
=================

[](#cmb2-conditionals)

[![Join the chat at https://gitter.im/wpsmith/cmb2-conditionals](https://camo.githubusercontent.com/37b38887022d6123609ddb9749e94d35b34054ee2f586c24c9efa6cc1cbc581a/68747470733a2f2f6261646765732e6769747465722e696d2f7770736d6974682f636d62322d636f6e646974696f6e616c732e737667)](https://gitter.im/wpsmith/cmb2-conditionals?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Total Downloads](https://camo.githubusercontent.com/9c2da7e5e9faefca30e3b16978cbb9bc7e82515afd28ed1787221e0139f96001/68747470733a2f2f706f7365722e707567782e6f72672f7770736d6974682f636d62322d636f6e646974696f6e616c732f646f776e6c6f616473)](https://packagist.org/packages/wpsmith/cmb2-conditionals)[![License](https://camo.githubusercontent.com/d7075d569f35a76ef3175f2794beb6adad3985ab881fb3ef44a86297b7dd983f/68747470733a2f2f706f7365722e707567782e6f72672f7770736d6974682f636d62322d636f6e646974696f6e616c732f6c6963656e7365)](https://packagist.org/packages/wpsmith/cmb2-conditionals)

**Contributors:** [wpsmith](https://github.com/wpsmith)
**Tags:** cmb2, conditionals, metaboxes
**Requires at least:** 3.8.0
**Tested up to:** 4.3
**Stable tag:** 1.0.5
**License:** GPLv2 or later
**License URI:**

Description
-----------

[](#description)

**CMB2 Conditionals** is a plugin for [CMB2](https://github.com/WebDevStudios/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 wordpress.org](http://wordpress.org/plugins/cmb2-conditionals/)**

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

Requirements
------------

[](#requirements)

- PHP 5.2.4+
- Wordpress 3.8+
- CMB2

Contribution
------------

[](#contribution)

All contributions welcome. If you would like to submit a pull request, please check out the [master branch](https://github.com/wpsmith/cmb2-conditionals/tree/master) and pull request against it. Please read the [CONTRIBUTING](https://github.com/wpsmith/cmb2-conditionals/blob/master/CONTRIBUTING.md) doc for more details.

A complete list of all our awesome contributors found here: [github.com/wpsmith/cmb2-conditionals/graphs/contributors](https://github.com/wpsmith/cmb2-conditionals/graphs/contributors)

Installation
------------

[](#installation)

If installing the plugin from wordpress.org:

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.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3481d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/46adebc3eebe7494dba592e75ac8f8572222050648b0283515b4a5896648d846?d=identicon)[wpsmith](/maintainers/wpsmith)

---

Tags

pluginwordpressmetaboxconditionals

### Embed Badge

![Health badge](/badges/wpsmith-cmb2-conditionals/health.svg)

```
[![Health](https://phpackages.com/badges/wpsmith-cmb2-conditionals/health.svg)](https://phpackages.com/packages/wpsmith-cmb2-conditionals)
```

###  Alternatives

[cmb2/cmb2

CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.

3.0k662.2k25](/packages/cmb2-cmb2)[webdevstudios/cmb2-attached-posts

Custom field for CMB2 for creating post relationships.

13465.7k](/packages/webdevstudios-cmb2-attached-posts)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.7k](/packages/afragen-git-updater)[webdevstudios/cpt-core

WordPress Custom Post Type OO wrapper

787.7k1](/packages/webdevstudios-cpt-core)[alexis-magina/cmb2-field-post-search-ajax

CMB2 field type to attach posts to each others. Search with Ajax.

3913.5k1](/packages/alexis-magina-cmb2-field-post-search-ajax)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
