by Justin Sternberg on WordPress.org
CMB2 is a metabox, custom fields, and forms library for WordPress that will blow your mind.
CMB2 is a developer’s toolkit for building metaboxes, custom fields, and forms for WordPress that will blow your mind. Easily manage meta for posts, terms, users, comments, or create custom option pages.
CMB2 is a complete rewrite of Custom Metaboxes and Fields for WordPress. To get started, please follow the examples in the included example-functions.php file and have a look at the basic usage instructions.
You can see a list of available field types here.
Development occurs on Github, and all contributions welcome. Please read the CONTRIBUTING doc for more details.
A complete list of all our awesome contributors found here: github.com/CMB2/CMB2/graphs/contributors
If you are looking to provide language translation files, Please do so via WordPress Plugin Translations.
Custom Field Types
custom_attached_posts, for attaching posts to a page.post_search_ajax Attach posts to each other. Same approach as CMB2 Attached Posts Field but with Ajax request, multiple/single option, and different UI.user_search_text adds a user-search dialog for searching/attaching other User IDs.CMB2 Field Type: Google Maps from mustardBees: Custom field type for Google Maps.
The
pw_mapfield stores the latitude/longitude values which you can then use to display a map in your theme.
CMB2 Field Type: Leaflet Maps from villeristi: Custom field type for Leaflet Maps.
CMB2 Field Type: Select2 from mustardBees: Custom field types which use the Select2 script:
- The
pw_select fieldacts much like the default select field. However, it adds typeahead-style search allowing you to quickly make a selection from a large list- The
pw_multiselectfield allows you to select multiple values with typeahead-style search. The values can be dragged and dropped to reorder
CMB Field Type: Slider from mattkrupnik: Adds a jQuery UI Slider field.
'apply_term' => false) to disable and save the term ids as data instead (like for options pages, etc).select field. However, it adds the support for optgroup and saving of values with multiple attribute.Other Helpful Resources