Home

Brian Richards edited this page Dec 21, 2016 · 54 revisions

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:

  1. Basic Usage
    Get up and running

  2. Field Types
    A breakdown of each of the field types included with CMB2.

  3. Field Parameters
    A breakdown of each of the common field parameters.

  4. Display Options
    Limit the display of your metaboxes

  5. Troubleshooting
    Some common issues and how to deal with them

  6. Notable Changes in CMB2 (from original CMB)
    CMB2 is a complete re-write

  7. Tips & Tricks
    10x your CMB2 skills.

  8. REST API
    Access your CMB2 data through the WordPress REST API.

Advanced tutorials:

  1. Adding your own field types
    There's no limit to the kinds of fields you can make with CMB2

  2. Adding your own show_on filters
    Even more ways to limit the display of your metaboxes

  3. Displaying metaboxes on the front-end
    Let's take this outside wp-admin

  4. Using CMB to create an Admin Theme Options Page
    Optional replacement for the WordPress Settings API

  5. Create New Posts (or Custom Post Type) Entries Using A Front End Form
    Leverage CMB2 create a front-end submission form

External Resources:

  1. CMB2 Snippet Library

  2. CMB2 Metabox Code Generator - Use this generator to create fully functional CMB2 metaboxes easily.

  3. Adding interactivity in metaboxes with javascript

  4. Basic CMB2 qTranslate-X integration plugin

  5. Tutorial: Disable CMB2 Styles on Front End Forms

  6. Listing of many great third party resources