Adds structured custom fields, custom post types, taxonomies, and developer APIs for building tailored WordPress editing and data models.
CMB2
Table of contents
- Code-first custom fields and metaboxes
- Features that matter for this plugin
- Who this fits best
- Trade-offs to consider
- Free vs paid
- When code-owned fields are the better architecture
- What to compare before choosing
- Practical decision notes
- PluginSuggest verdict
- Why CMB2 remains different from visual field builders
- CMB2 FAQs
Plugin Health & Stats
Historical overview
364-day WordPress.org historyQuick take: A dependable developer toolkit when custom fields belong in code and visual field builders would add unnecessary abstraction.
Best fit: WordPress developers who need a code-first toolkit for custom fields, metaboxes, option pages, and frontend or admin forms.
Code-first custom fields and metaboxes
CMB2 is a developer toolkit rather than an editorial field-builder UI. It gives theme and plugin developers a structured API for registering metaboxes, fields, option pages, and forms while keeping that configuration in code.
Features that matter for this plugin
- Metabox and custom-field API: Developers can define reusable field groups for posts and custom post types using PHP configuration.
- Multiple object types: CMB2 can manage metadata for posts, users, terms, comments, and other WordPress contexts instead of being limited to one content screen.
- Option pages and forms: The API can be used for settings-style interfaces and front-end or admin forms in addition to ordinary post metadata.
- Field-type library: Common input types are included, while the architecture allows developers to extend the system for custom requirements.
- Code-based portability: Because field definitions live in code, configuration can move through version control and deployment workflows with the theme or plugin that owns it.
Who this fits best
Development teams that prefer defining fields and metaboxes in PHP rather than maintaining a visual field-builder configuration.
Developer-focused and flexible. Supports several WordPress object types. Mature open-source API. These strengths matter most when they align with an existing operational need.
Trade-offs to consider
Requires PHP development knowledge. Less approachable than visual custom-field plugins for editorial teams. Test these constraints on staging before rolling the plugin across an important production site.
Free vs paid
The WordPress.org version is currently free. The main decision is whether this focused workflow belongs in your stack.
When code-owned fields are the better architecture
I would use CMB2 when developers, not editors, own the field model and the configuration should travel with code. For editorial teams that frequently create and modify field groups through a UI, a visual custom-field system is usually easier to operate.
What to compare before choosing
Advanced Custom Fields, Meta Box, Pods, and similar platforms are stronger comparisons when a visual field-management experience matters. CMB2 is most attractive when a lightweight developer API and version-controlled definitions are preferred.
Practical decision notes
CMB2 fits teams that want the field model to be part of the codebase. That has practical advantages in professional development: a pull request can show when a field was added, staging and production receive the same definitions, and the configuration does not depend on someone reproducing UI settings manually. The trade-off is that editors cannot casually redesign the content model. If non-developers need to create fields regularly, the discipline of code ownership becomes a bottleneck rather than a benefit.
This also makes ownership clearer: the plugin or theme that registers the fields can ship the field definitions, validation, and business logic together instead of splitting them between code and an admin-only configuration screen.
CMB2 is especially strong when the same field configuration must move consistently through local, staging, and production environments under version control.
It also makes deployment ownership much clearer for teams.
PluginSuggest verdict
A dependable developer toolkit when custom fields belong in code and visual field builders would add unnecessary abstraction.
On shared codebases, keep field definitions in a dedicated plugin or well-documented module instead of scattering them across templates. That makes automated tests, deployment reviews, and deactivation behavior easier to reason about. When editors need to understand the data model, supplement code definitions with internal documentation because CMB2 deliberately provides less visual schema discovery than admin-first field builders.
Why CMB2 remains different from visual field builders
CMB2 keeps the content model close to code. Field definitions can live with the theme or plugin that consumes them, which makes reviews, version control, and repeatable deployments straightforward for development teams. There is less admin UI for non-developers, but there is also less configuration stored invisibly in the database.
That approach works particularly well for reusable plugins and agency starter frameworks. The trade-off is migration responsibility: developers must map field IDs, sanitization callbacks, repeatable groups, option pages, and frontend form handlers when replacing CMB2 with a visual framework.
CMB2 FAQs
Is CMB2 a no-code custom-field builder?
No. It is primarily a developer toolkit configured through PHP.
What WordPress objects can CMB2 work with?
Its API can manage metadata and forms for posts, users, terms, comments, option pages, and other supported contexts.
Can CMB2 create front-end forms?
Yes. Its APIs can be used beyond ordinary admin metaboxes, including custom forms.
Why would a developer choose CMB2 over a visual field builder?
Code-based definitions are easier to version, review, and deploy with a theme or plugin when developers own the data model.
Is CMB2 free?
Yes. CMB2 is an open-source WordPress plugin.
What should non-developers compare instead?
A visual custom-field platform such as ACF, Meta Box, or Pods is usually easier when editors need to manage field groups without writing PHP.
Compare before you install
Similar Plugins
Builds custom fields and structured WordPress data with a free framework, visual Lite tools, and modular premium extensions for advanced…
Runs and organizes reusable PHP, CSS, JavaScript, HTML, and content snippets without editing theme files, with cloud and Pro tools…