Creating Meta Boxes

Create a Hook and it will create a Meta box, it takes all the parameter of CMB2, fields are added separately

Various Fields Type

Here’s the built-in fields you can include in your metabox. You can also add your own field types.

  1. title An arbitrary title field *
  2. text
  3. text_small
  4. text_medium
  5. text_email
  6. text_url
  7. text_money
  8. textarea
  9. textarea_small
  10. textarea_code
  11. text_time Time picker
  12. select_timezone Time zone dropdown
  13. text_date_timestamp Date Picker (UNIX timestamp)
  14. text_datetime_timestamp Text Date/Time Picker Combo (UNIX timestamp)
  15. text_datetime_timestamp_timezone Text Date/Time Picker/Time zone Combo (serialized DateTime object)
  16. hidden Hidden input type
  17. colorpicker Color picker
  18. radio *
  19. radio_inline *
  20. taxonomy_radio *
  21. taxonomy_radio_inline *
  22. select
  23. taxonomy_select *
  24. checkbox *
  25. multicheck and multicheck_inline
  26. taxonomy_multicheck *
  27. taxonomy_multicheck_inline
  28. wysiwyg (TinyMCE) *
  29. file Image/File upload *†
  30. file_list Image/File list upload
  31. oembed Converts oembed urls (instagram, twitter, youtube, etc. oEmbed in the Codex)
  32. group Hybrid field that supports adding other fields as a repeatable group. *

For more details read this article https://github.com/WebDevStudios/CMB2/wiki/Field-Types