{"id":18144,"date":"2016-07-25T11:00:32","date_gmt":"2016-07-25T16:00:32","guid":{"rendered":"https:\/\/getflywheel.com\/?p=18144"},"modified":"2026-01-22T11:27:42","modified_gmt":"2026-01-22T17:27:42","slug":"how-to-create-custom-meta-boxes-with-cmb2","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/","title":{"rendered":"How to Create Custom Meta Boxes with CMB2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/wordpress.org\/plugins\/cmb2\/\" target=\"_blank\" rel=\"noreferrer noopener\">CMB2<\/a> has become a favorite plugin within the WordPress<sup>\u00ae<\/sup> community and is used in many digital experience across the web. In this article, we&#8217;ll show you how to use it to create custom meta boxes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">First, What is CMB2?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">CMB is an acronym for Custom Meta Boxes and per the description on <a href=\"https:\/\/wordpress.org\/plugins\/cmb2\/\" target=\"_blank\" rel=\"noopener noreferrer\">the plugin page<\/a>, \u201cCMB2 is a meta box, custom fields, and forms library for WordPress that will blow your mind.\u201d It was developed by Justin Sternberg of <a href=\"https:\/\/webdevstudios.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">WebDevStudios<\/a>&nbsp;and had been in the plugin repository for a little over two years. However, last February, the good folks over at the WordPress plugin repository recognized that they goofed and approved CMB2 as a plugin when they shouldn&#8217;t have.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See, plugins typically are able to do something right out of the box; they have some inherent functionality. CMB2 is actually a framework. As Sternberg once explained, \u201cIt\u2019s a developer\u2019s framework for easily building in forms and fields to your themes and plugins.\u201d In fact, when you install CMB2, nothing will happen. You won\u2019t get an admin page and there isn\u2019t an admin user interface. To use CMB2 you have to be able to write code and add to your <code>functions.php<\/code> file. For that reason, it&#8217;s a bit of a \u2018non-plugin\u2019 plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The good news is that the plugin approval team has agreed to leave it in <a href=\"https:\/\/wordpress.org\/plugins\/cmb2\/\" target=\"_blank\" rel=\"noopener noreferrer\">the repository<\/a>, so you can continue to download and update it from there. You can read all about the history <a href=\"http:\/\/dsgnwrks.pro\/open-source\/what-is-the-future-of-cmb2\/\" target=\"_blank\" rel=\"noopener noreferrer\">here at Justin\u2019s site<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set up CMB2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In order to get started, you will need to find the <code>example-functions.php<\/code> file from the plugin directory and copy it into your theme. It can be copied directly into the theme\u2019s root folder, but to keep your project nicely organized, we suggest copying it into a folder such as <code>\/lib\/<\/code> or <code>\/includes\/<\/code>. If you already know how you would like to use CMB2, then you may want to go ahead and rename the file to something more appropriate. For example, if you wanted to use it to create custom fields for a testimonials page, you might name it <code>testimonial-functions.php<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, you will will need to make sure that WordPress finds the new file by adding a <code>require_once<\/code> statement to your <code>functions.php<\/code> file. That\u2019ll look something like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require_once( dirname(__FILE__) . '\/lib\/testimonial-functions.php');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now it is time to really dig in. Open the <code>testimonial-functions.php<\/code> file (or whatever you named it as). You will notice that not only has Justin created an example of just about every type of field possible, but he has also created functions for displaying the fields by homepage, category, post id, etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: This article is intended to introduce you to CMB2; it isn\u2019t going to be a full tutorial on how to use every aspect of it, and because it is a framework and was developed to assist programmers, you should have a basic understanding of PHP and the inner workings of WordPress. If you are looking for a Custom Meta Box plugin that has an admin user interface, you might want to check out the <a href=\"https:\/\/wordpress.org\/plugins\/advanced-custom-fields\/\" target=\"_blank\" rel=\"noopener noreferrer\">Advanced Custom Fields<\/a> plugin.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, let\u2019s get back to building some custom meta boxes for something simple such as a testimonial. First, determine the number and types of fields you will need. For the sake of keeping it simple, let\u2019s say we need three fields. One for the actual testimonial, one for the name of the person giving the testimonial, and one for an image of the person.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Working in the <code>testimonial-functions.php<\/code> file, you will need to find the the section for registering and adding your new function. That code looks something like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'cmb2_admin_init', 'yourprefix_register_demo_metabox' );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we suggest you rename your function to something relevant to your theme and project.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'cmb2_admin_init', 'register_testimonial_metabox' );\n\/**\n * Hook in and add a testimonial metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.\n *\/\nfunction register_testimonial_metabox() {<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I also suggest you rename the prefix.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Start with an underscore to hide fields from custom fields list\n$prefix = '_yourprefix_'; \/\/note, you can use anything you'd like here, but you need to remember what you use, because you will be using it again later.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There are several different field types to choose from. We are going to use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'type' =&amp;amp;amp;gt; 'textarea_small' \/\/ for the author field\n'type'    =&amp;amp;amp;gt; 'wysiwyg' \/\/ for the testimonial in case we want to include html\n'type' =&amp;amp;amp;gt; 'file' \/\/ for the image of the project or author\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Testimonial Author', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Who is the testimonial from', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'author', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'textarea_small',\n\t) );\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name'    =&amp;amp;amp;gt; __( 'Testimonial', 'cmb2' ),\n\t'desc'    =&amp;amp;amp;gt; __( 'add the testimonial here', 'cmb2' ),\n\t'id'      =&amp;amp;amp;gt; $prefix . 'testimonial', \/\/Note, we renamed this to be more appropriate\n\t'type'    =&amp;amp;amp;gt; 'wysiwyg',\n\t'options' =&amp;amp;amp;gt; array( 'textarea_rows' =&amp;amp;amp;gt; 5, ),\n\t) );\n\n\t$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Author Image', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Upload an image or enter a URL.', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'image', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'file',\n\t) );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">These three new fields need to be added to the new function, so that would look like the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>add_action( 'cmb2_admin_init', 'register_testimonial_metabox' );\n\/**\n * Hook in and add a testimonial metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.\n *\/\nfunction register_testimonial_metabox() {\n\n \/\/ Start with an underscore to hide fields from custom fields list\n    $prefix = '_yourprefix_'; \/\/note, you can use anything you'd like here\n\n\/**\n * Start field groups here\n *\/\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Testimonial Author', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Who is the testimonial from', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'author', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'textarea_small',\n\t) );\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name'    =&amp;amp;amp;gt; __( 'Testimonial', 'cmb2' ),\n\t'desc'    =&amp;amp;amp;gt; __( 'add the testimonial here', 'cmb2' ),\n\t'id'      =&amp;amp;amp;gt; $prefix . 'testimonial', \/\/Note, we renamed this to be more appropriate\n\t'type'    =&amp;amp;amp;gt; 'wysiwyg',\n\t'options' =&amp;amp;amp;gt; array( 'textarea_rows' =&amp;amp;amp;gt; 5, ),\n\t) );\n\n\t$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Author Image', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Upload an image or enter a URL.', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'image', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'file',\n\t) );\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And that\u2019s it! Your final code should look like:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;amp;amp;lt;?php\n\/**\n * Include and set up custom metaboxes and fields. (Make sure you copy this file outside the CMB2 directory)\n *\n * Be sure to replace all instances of 'yourprefix_' with your project's prefix.\n * http:\/\/nacin.com\/2010\/05\/11\/in-wordpress-prefix-everything\/\n *\n * @category YourThemeOrPlugin\n * @package  Demo_CMB2\n * @license  http:\/\/www.opensource.org\/licenses\/gpl-license.php GPL v2.0 (or later)\n * @link     https:\/\/github.com\/WebDevStudios\/CMB2\n *\/\n\n\/**\n * Get the bootstrap! If using the plugin from wordpress.org, REMOVE THIS!\n *\/\n\nif ( file_exists( dirname( __FILE__ ) . '\/CMB2\/init.php' ) ) {\n\trequire_once dirname( __FILE__ ) . '\/CMB2\/init.php';\n} elseif ( file_exists( dirname( __FILE__ ) . '\/CMB2\/init.php' ) ) {\n\trequire_once dirname( __FILE__ ) . '\/CMB2\/init.php';\n}\n\nadd_action( 'cmb2_admin_init', 'register_testimonial_metabox' );\n\/**\n * Hook in and add a testimonial metabox. Can only happen on the 'cmb2_admin_init' or 'cmb2_init' hook.\n *\/\nfunction register_testimonial_metabox() {\n\n \/\/ Start with an underscore to hide fields from custom fields list\n    $prefix = '_yourprefix_'; \/\/note, you can use anything you'd like here\n\n\/**\n * Start field groups here\n *\/\n\n\/\/ This first field group tells WordPress where to put the fields. In the example below, it is set to show up only on Post_ID=10\n\n$cmb_demo = new_cmb2_box( array(\n\t\t'id'            =&amp;amp;amp;gt; $prefix . 'metabox',\n\t\t'title'         =&amp;amp;amp;gt; __( 'Homepage Custom Fields', 'cmb2' ),\n\t\t'object_types'  =&amp;amp;amp;gt; array( 'page', ), \/\/ Post type\n\t\t'show_on'      =&amp;amp;amp;gt; array( 'id' =&amp;amp;amp;gt; array( 10, ) ), \/\/ Specific post IDs to display this metabox\n\t\t) );\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Testimonial Author', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Who is the testimonial from', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'author', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'textarea_small',\n\t) );\n\n$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name'    =&amp;amp;amp;gt; __( 'Testimonial', 'cmb2' ),\n\t'desc'    =&amp;amp;amp;gt; __( 'add the testimonial here', 'cmb2' ),\n\t'id'      =&amp;amp;amp;gt; $prefix . 'testimonial', \/\/Note, we renamed this to be more appropriate\n\t'type'    =&amp;amp;amp;gt; 'wysiwyg',\n\t'options' =&amp;amp;amp;gt; array( 'textarea_rows' =&amp;amp;amp;gt; 5, ),\n\t) );\n\n\t$cmb_demo-&amp;amp;amp;gt;add_field( array(\n\t'name' =&amp;amp;amp;gt; __( 'Author Image', 'cmb2' ),\n\t'desc' =&amp;amp;amp;gt; __( 'Upload an image or enter a URL.', 'cmb2' ),\n\t'id'   =&amp;amp;amp;gt; $prefix . 'image', \/\/Note, we renamed this to be more appropriate\n\t'type' =&amp;amp;amp;gt; 'file',\n\t) );\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When complete, you should have a page that looks something like the following:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2016\/07\/how-to-use-cmb2-example.jpg\" alt=\"how-to-use-cmb2-example\" class=\"wp-image-18145\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Using CMB2 is a great way to give your website exactly what you need, as the options really are endless. For example, CMB2 can be used to create a theme options page with meta boxes for logos, URLs to social media sites, or videos. In the case of building a website for a client, CMB2 is perfect for customizing the admin so that the client doesn\u2019t have to format content to match your theme\u2019s styles. And once the data is entered, you can display the content with all the styling already in place in your HTML and CSS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have mastered adding basic fields with CMB2, try adding the Repeatable Field Groups. With these, you will be able to add as many of any content types as you\u2019d like, and then using a for-each loop, you can start creating slideshows or carousels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CMB2 has allowed many developers to take their WordPress sites to the next level, and we hope that it will do the same for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For another easy way to elevate your sites, check out WP Engine for a world-class <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">hosting<\/a> experience!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why you need Custom Meta Boxes for your WordPress post. <\/p>\n","protected":false},"author":1,"featured_media":140694,"template":"","resource-topic":[1396],"resource-role":[1397,896],"resource-type":[916],"class_list":["post-18144","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create Custom Meta Boxes with CMB2<\/title>\n<meta name=\"description\" content=\"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create Custom Meta Boxes with CMB2\" \/>\n<meta property=\"og:description\" content=\"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-22T17:27:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/CMB2-meta-boxes_1200x627.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/CMB2-meta-boxes_1200x627.png\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/\",\"name\":\"How to Create Custom Meta Boxes with CMB2\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2016-07-25T16:00:32+00:00\",\"dateModified\":\"2026-01-22T17:27:42+00:00\",\"description\":\"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Create Custom Meta Boxes with CMB2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"sameAs\":[\"https:\/\/wpengine.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create Custom Meta Boxes with CMB2","description":"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Create Custom Meta Boxes with CMB2","og_description":"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2026-01-22T17:27:42+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/CMB2-meta-boxes_1200x627.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/CMB2-meta-boxes_1200x627.png","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/","name":"How to Create Custom Meta Boxes with CMB2","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2016-07-25T16:00:32+00:00","dateModified":"2026-01-22T17:27:42+00:00","description":"Learn more about using the CMB2 plugin to build custom meta boxes on your WordPress site, including a step-by-step guide on getting set up.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/how-to-create-custom-meta-boxes-with-cmb2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"How to Create Custom Meta Boxes with CMB2"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"sameAs":["https:\/\/wpengine.com"]}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2016\/07\/cmb2-meta-boxes_343x245.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Designer, Developer","topic":"<strong>Topics:<\/strong> Design","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/18144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/140694"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=18144"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=18144"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=18144"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=18144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}