-
Notifications
You must be signed in to change notification settings - Fork 573
Home
Welcome to the CMB2 wiki! This is a code library for WordPress themes and plugins that makes it easy to add metaboxes, fields, and forms to WordPress. Easily manage meta for posts, terms, users, comments, or create custom option pages.
The best way to get started is look at example-functions.php and read the Basic Usage tutorial.
Documentation:
-
Installation
Installation instructions for various environments -
Basic Usage
Get up and running -
Advanced Usage
Not for the faint of heart -
Field Types
A breakdown of each of the field types included with CMB2. -
Examples
Examples for registering fields for the different object types. -
Field Parameters
A breakdown of each of the common field parameters. -
Display Options
Limit the display of your boxes -
Box Properties
Docs for the possible CMB2 box properties. -
Troubleshooting
Some common issues and how to deal with them -
Notable Changes in CMB2 (from original CMB)
CMB2 is a complete re-write -
Tips & Tricks
10x your CMB2 skills. -
REST API
Access your CMB2 data through the WordPress REST API. -
Javascript API
How to work with the various CMB2 events and hooks in Javascript.
Advanced tutorials:
-
Adding your own field types
There's no limit to the kinds of fields you can make with CMB2 -
Adding your own show_on filters
Even more ways to limit the display of your boxes -
Displaying boxes on the front-end
Let's take this outside wp-admin -
Using CMB to create an Admin Theme Options Page
Optional replacement for the WordPress Settings API -
Create New Posts (or Custom Post Type) Entries Using A Front End Form
Leverage CMB2 create a front-end submission form
External Resources:
-
CMB2 Box Registration Code Generator
Use this generator to create fully functional CMB2 boxes easily.
Documentation:
-
Installation
Installation instructions for various environments -
Basic Usage
Get up and running -
Advanced Usage
Not for the faint of heart -
Field Types
Breakdown of field types -
Examples
Examples for registering fields -
Field Parameters
Breakdown of common field parameters -
Display Options
Limit display of boxes -
Box Properties
Breakdown of box properties -
Troubleshooting
Common issues & how to deal with them -
Notable Changes in CMB2 (from original CMB)
CMB2 — a complete re-write -
Tips & Tricks
10x your CMB2 skills -
REST API
CMB2 data through WordPress REST API -
Javascript API
Work with CMB2 JS events & hooks
Advanced tutorials:
- Adding your own field types
- Adding your own show_on filters
- Displaying boxes on the front-end
- Using CMB to create an Admin Theme Options Page
- Create New Posts (or Custom Post Type) Entries Using A Front End Form
- Disable CMB2 Styles on Front End Forms
External Resources: