{"id":139646,"date":"2015-06-09T11:00:59","date_gmt":"2015-06-09T16:00:59","guid":{"rendered":"https:\/\/getflywheel.com\/?p=10230"},"modified":"2024-10-02T12:59:28","modified_gmt":"2024-10-02T17:59:28","slug":"create-custom-wordpress-meta-box","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/","title":{"rendered":"How to Create a Custom WordPress Meta Box"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Custom meta boxes allow additional information to be added to posts, pages, and custom post types, apart from the standard meta boxes that are automatically available to use right \u201cout of the box\u201d in WordPress, which are included in the WordPress core.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you were aware of it or not, you\u2019ve been using meta boxes for awhile now. Things like dashboard widgets, editor, custom fields, featured image, categories, and tags are examples of meta boxes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How to Create a Custom WordPress Meta Box<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">What happens when you need to create an additional meta box, maybe something a little more custom for your project? There are existing plugins out there that help create custom meta boxes, which can be great options. Even if you decide this is the route you are going to take, it is still important to understand the basic concepts of what is going on under the hood of custom meta boxes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will be going over concepts at a very high level when we create this very simple meta box. When we\u2019re done, we will have a custom meta box that will allow us to enter a product title.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Even though we are starting off simple, keep in mind that this idea can be expanded for more complex needs. There are a lot of options and additional features that can be included in a custom meta box. Things like check boxes, file upload, etc. are all possible features of a custom meta box. This tutorial assumes that you are familiar with CSS, which is needed to style the fields. We will not be going into great detail to discuss styling, but this is something that can easily be done after your meta box is up and running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Developing the Custom Meta Box<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Custom code for meta boxes can be included in functions.php or in a plugin. This example will include the needed code in the form of a plugin. This can be copied step by step to make a complete file that is ready to use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Codex is Your Guide<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/codex.wordpress.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">Codex<\/a> will be your best friend, if it isn\u2019t already. Different arguments have different options, and the Codex will explain this in great detail. It\u2019s worth mentioning that the Codex is something you should get to know well.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test Locally First<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the one and only disclaimer for this tutorial. <b>Please try this in a local development environment first. <\/b>Although we all appreciate a little adventure in our lives, no one likes the white screen of death, especially on a live site. We are going to go step by step through this tutorial, and there are dependencies that occur as we move through it. Because of this, there is a good chance that doing a save midway through may cause an error.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step One: Create and Put Heading into Plugin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Creating a plugin might sound complex, but not all plugins have to be hundreds of lines. Plugins can be very simple, and this is a great example of that. If you go to the <em>wp-content folder<\/em>, you will see a <em>plugins folder<\/em>. Make a new folder called <em>custom-post-meta-box<\/em> with a <code>custom-post-meta-box.php<\/code> file in it. This is the file you will be working from.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10315\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2015\/06\/file-path-meta-box.png\" alt=\"file-path-meta-box\" width=\"1022\" height=\"67\"><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">When creating a plugin, make sure this information appears before any of your custom code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&amp;lt;?php\n\n\/*\n\nPlugin Name: Custom Meta Box\n\nPlugin URI: &nbsp;www.yourwebsite.com\n\nDescription: Creates a meta box in WordPress\n\nVersion: &nbsp;&nbsp;&nbsp;&nbsp;1.0.0\n\nAuthor: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Your Name\n\nAuthor URI: &nbsp;www.yourwebsite.com\n\nLicense: GPL2\n\n*\/<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Activate the Plugin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Even though we did not put any code in there yet, we can activate the plugin by going to Plugins and looking for Custom Meta Box and choosing Activate. Please keep in mind that nothing will change quite yet.<\/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\/2015\/06\/00-activate-plugin.jpg\" alt=\"00-activate-plugin\" class=\"wp-image-10238\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><b>Optional CSS<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is optional, but if you plan on adding some custom css, copy this into your plugin file. Be sure that the <code>.css<\/code> file is found in the <em>css<\/em> folder of your plugin.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function cmb_add_admin_styles() {\n\nwp_enqueue_style('cmb-admin', plugins_url( 'custom-post-meta-box\/css\/admin.css' ) );\n\n}\n\nadd_action( 'admin_enqueue_scripts', 'cmb_add_admin_styles' );<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2015\/06\/01-css-file-location.jpg\" alt=\"01-css-file-location\" class=\"wp-image-10239\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><b>Step Two: Adding the Meta Box<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>add_meta_box<\/code> function is used to create custom meta boxes. This function is only responsible for registering and displaying custom meta boxes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function cmb_add_meta_box() {\n\nadd_meta_box(\n\n'custom_post_metabox',\n\n'Our Products',\n\n'cmb_display_meta_box',\n\n'post',\n\n'normal',\n\n'high'\n\n);\n\n}\n\nadd_action( 'add_meta_boxes', 'cmb_add_meta_box' );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Take a look at the dashboard, the title \u201cOur Products\u201d is showing up, but there isn\u2019t a text field for us to enter our text.<\/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\/2015\/06\/01-meta-box-start.jpg\" alt=\"01-meta-box-start\" class=\"wp-image-10245\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step Three: Adding the Meta Box Field in the Admin<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">We need to make sure that there is a label and field for the information. By using html, this is possible.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function cmb_display_meta_box( $post ) {\n\nwp_nonce_field( plugin_basename(__FILE__), 'cmb_nonce_field' );\n\n$html = '&amp;lt;label id=\"product-title\" for=\"product-title\"&amp;gt;';\n\n$html .= 'Product Title';\n\n$html .= '&amp;lt;\/label&amp;gt;';\n\n$html .= '&amp;lt;input type=\"text\" id=\"product-title\" name=\"product-title\" value=\"' . get_post_meta( $post-&amp;gt;ID, 'product-title', true ) . '\" placeholder=\"What is the Product Title?\" \/&amp;gt;';\n\necho $html;\n\n}\n\n\/\/ this echoes a single stream of html<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img decoding=\"async\" src=\"https:\/\/getflywheel-images.s3.us-east-2.amazonaws.com\/uploads\/2015\/06\/02-meta-box.jpg\" alt=\"02-meta-box\" class=\"wp-image-10240\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">See how things are wrapped in the <code>&lt;label&gt;<\/code>? We get to see the descriptive text \u201cProduct Title\u201d which helps the user understand what the field is and what type of information should be entered. Also note that there is placeholder text, which also adds helpful information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your input may not be as wide. Some custom css was done so all the placeholder text could be shown; the label has a width of 100%.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step Four: Saving the Data and the Importance of Using a Nonce<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You may have entered text in Step Three and realized that it isn\u2019t actually being saved or being displayed on the page. This step is really where all the magic happens.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function cmb_save_meta_box_data( $post_id ) {\n\nif ( cmb_user_can_save( $post_id, 'cmb_nonce_field' ) ) {\n\nif ( isset( $_POST&#091;'product-title'] ) &amp;amp;&amp;amp; 0 &amp;lt; count( strlen( trim( $_POST&#091;'product-title'] ) ) ) ) {\n\n$product_title = stripslashes( strip_tags( $_POST&#091;'product-title'] ) );\n\nupdate_post_meta( $post_id, 'product-title', $product_title );\n\n}\n\n}\n\n}\n\nadd_action( 'save_post', 'cmb_save_meta_box_data' );\n\nfunction cmb_display_product( $content ) {\n\nif ( is_single () ){\n\n$html = 'The Product Title is: ' . get_post_meta( get_the_ID(), 'product-title', true );\n\n$content .= $html;\n\n}\n\nreturn $content;\n\n}\n\nadd_action('the_content', 'cmb_display_product');\n\nfunction cmb_user_can_save( $post_id, $nonce ) {\n\n$is_autosave = wp_is_post_autosave( $post_id );\n\n$is_revision = wp_is_post_revision( $post_id );\n\n$is_valid_nonce = ( isset( $_POST&#091; $nonce ] ) &amp;amp;&amp;amp; wp_verify_nonce( $_POST &#091; $nonce ], plugin_basename( __FILE__ ) ) );\n\nreturn ! ( $is_autosave || $is_revision ) &amp;amp;&amp;amp; $is_valid_nonce;\n\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">There\u2019s a few things going on here. Basically, the <code>cmb_save_meta_box_data<\/code> function is what we need for all the saving to take place. We will be focusing on security with a nonce value. This is a security measure that makes sure data to be saved is coming from the correct source. Also, we want to make sure that the post is not an autosave or a revision. Then the nonce will be validated and the user can save.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we can safely save, this is how the meta information appears on the page. As you can see, it could easily be styled, but it does work and data is saved.<\/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\/2015\/06\/03-saved-meta-info.jpg\" alt=\"03-saved-meta-info\" class=\"wp-image-10241\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Further Reading and Homework<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see, in just a few steps, you can have a custom meta box. Like most development projects, there are multiple ways to achieve the same thing, so you may find other approaches to this same task.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We took a look at custom meta boxes at a very high level so you may want to take a deeper look at these concepts. If you find yourself having a greater need for custom meta boxes, here are some great sources for further discovery:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/codex.wordpress.org\/WordPress_Nonces\" target=\"_blank\" rel=\"noreferrer noopener\">More information about nonces<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/plugins\/meta-box\/\" target=\"_blank\" rel=\"noreferrer noopener\">Meta Box Plugin<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_meta_box\/\" target=\"_blank\" rel=\"noreferrer noopener\">Options for the add_meta_box function<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Or, check out our library of <a href=\"https:\/\/wpengine.com\/resources\/\" target=\"_blank\" rel=\"noreferrer noopener\">resources<\/a>! Our commitment to developers doesn&#8217;t end at our world-class <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">hosting for WordPress websites<\/a> and 24\/7 support\u2014we&#8217;re also committed to giving back to the community through high-quality resources for continued learning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Custom meta boxes allow additional information to be added to posts, pages, and custom post types, apart from the standard meta boxes that are automatically available to use right \u201cout of the box\u201d in WordPress, which are included in the WordPress core. Whether you were aware of it or not, you\u2019ve been using meta boxes<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":1,"featured_media":141087,"template":"","resource-topic":[912],"resource-role":[896],"resource-type":[916],"class_list":["post-139646","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 a Custom WordPress Meta Box<\/title>\n<meta name=\"description\" content=\"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.\" \/>\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 a Custom WordPress Meta Box\" \/>\n<meta property=\"og:description\" content=\"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/\" \/>\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=\"2024-10-02T17:59:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2015\/06\/meta-box_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\/2015\/06\/meta-box_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\/create-custom-wordpress-meta-box\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/\",\"name\":\"How to Create a Custom WordPress Meta Box\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2015-06-09T16:00:59+00:00\",\"dateModified\":\"2024-10-02T17:59:28+00:00\",\"description\":\"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/#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 a Custom WordPress Meta Box\"}]},{\"@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 a Custom WordPress Meta Box","description":"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"How to Create a Custom WordPress Meta Box","og_description":"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2024-10-02T17:59:28+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2015\/06\/meta-box_1200x627.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2015\/06\/meta-box_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\/create-custom-wordpress-meta-box\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/","name":"How to Create a Custom WordPress Meta Box","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2015-06-09T16:00:59+00:00","dateModified":"2024-10-02T17:59:28+00:00","description":"Custom meta boxes allow additional information to be added to posts, pages, and custom post types. We look into how to use them and why.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/create-custom-wordpress-meta-box\/#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 a Custom WordPress Meta Box"}]},{"@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\/2015\/06\/meta-box_343x245.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Developer","topic":"<strong>Topics:<\/strong> Performance","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/139646","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\/141087"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=139646"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=139646"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=139646"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=139646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}