{"id":41369,"date":"2023-01-25T20:12:00","date_gmt":"2023-01-25T11:12:00","guid":{"rendered":"https:\/\/kinsta.com\/jp\/?p=41369&#038;preview=true&#038;preview_id=41369"},"modified":"2023-08-29T08:21:59","modified_gmt":"2023-08-28T23:21:59","slug":"wordpress-add-meta-box-to-post","status":"publish","type":"post","link":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/","title":{"rendered":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><a href=\"https:\/\/kinsta.com\/jp\/blog\/advanced-custom-fields\/#what\">\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9<\/a>\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u8ffd\u52a0\u306e\u60c5\u5831\u3092\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u60c5\u5831\u306f\u3001\u4e00\u822c\u306b\u300c<a href=\"https:\/\/developer.wordpress.org\/plugins\/metadata\/\">\u30e1\u30bf\u30c7\u30fc\u30bf<\/a>\u300d\u3068\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<blockquote><p>\u300c\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u300c\u60c5\u5831\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u300d\u3067\u3042\u308a\u3001WordPress\u306b\u304a\u3044\u3066\u306f\u3001\u6295\u7a3f\u3001\u30e6\u30fc\u30b6\u30fc\u3001\u30b3\u30e1\u30f3\u30c8\u3001\u30bf\u30fc\u30e0\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>WordPress\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u306f\u3001\u300c\u591a\u5bfe\u4e00\u300d\u306e\u95a2\u4fc2\u306b\u3042\u308a\u3001\u9078\u629e\u80a2\u306b\u306f\u4e8b\u5b9f\u4e0a\u3001\u5236\u9650\u304c\u306a\u3044\u3002\u597d\u304d\u306a\u3060\u3051\u30e1\u30bf\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3057\u3001\u3042\u3089\u3086\u308b\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u300d\uff08\u82f1\u8a9e\u539f\u6587\u306e\u65e5\u672c\u8a9e\u8a33\uff09<\/p>\n<p><em>\u2014<a href=\"https:\/\/developer.wordpress.org\/plugins\/metadata\/\">Plugin Handbook<\/a><\/em><\/p><\/blockquote>\n<p>\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3057\u3066\u6295\u7a3f\u306b\u4ed8\u4e0e\u3059\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u4f8b\u3092\u3044\u304f\u3064\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<ul>\n<li>\u4f4f\u6240\u3084\u4e0d\u52d5\u7523\u306e\u5730\u7406\u7684\u306a\u5ea7\u6a19\u5024<\/li>\n<li>\u30a4\u30d9\u30f3\u30c8\u306e\u65e5\u4ed8<\/li>\n<li>\u66f8\u7c4d\u306eISBN\u3084\u8457\u8005\u540d<\/li>\n<li>\u6295\u7a3f\u8005\u306e\u305d\u306e\u65e5\u306e\u6c17\u5206<\/li>\n<\/ul>\n<p>\u7b49\u3005\u3001\u6319\u3052\u305f\u3089\u304d\u308a\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>WordPress\u306b\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5bb9\u6613\u306b\u8ffd\u52a0\u3001\u7ba1\u7406\u3067\u304d\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6a5f\u80fd\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001\u30da\u30fc\u30b8\u306e\u4e00\u756a\u4e0b\u3001\u6295\u7a3f\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u4e0b\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142717\" aria-describedby=\"caption-attachment-142717\" style=\"width: 2555px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142717 size-full\" style=\"font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size: 1rem\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-fields-classic-editor.jpg\" alt=\"\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\" width=\"2555\" height=\"1832\"><figcaption id=\"caption-attachment-142717\" class=\"wp-caption-text\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9<\/figcaption><\/figure>\n<p>Gutenberg\u3067\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u6295\u7a3f\u8a2d\u5b9a\u3067\u8a72\u5f53\u3059\u308b\u9805\u76ee\u3092\u9078\u629e\u3057\u3066\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142718\" aria-describedby=\"caption-attachment-142718\" style=\"width: 1500px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142718 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/adding-custom-fields-to-the-block-editor.jpg\" alt=\"\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u30d1\u30cd\u30eb\u3092\u8ffd\u52a0\" width=\"1500\" height=\"964\"><figcaption id=\"caption-attachment-142718\" class=\"wp-caption-text\">\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u30d1\u30cd\u30eb\u3092\u8ffd\u52a0<\/figcaption><\/figure>\n<p>\u305f\u3060\u3057\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u306b\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u307e\u305f\u306f\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n<p>\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u304c\u3059\u3050\u306b\u5229\u7528\u3067\u304d\u308b<a href=\"https:\/\/wordpress.org\/plugins\/search\/custom+fields\/\">\u512a\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3<\/a>\u306f\u3001\u591a\u6570\u5b58\u5728\u3057\u307e\u3059\u3002WordPress\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u3082\u3063\u3068\u6d3b\u7528\u3057\u305f\u3044\u3001\u900f\u904e\u7684\u306b\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3068\u7d71\u5408\u3057\u305f\u3044\u3001\u307e\u305f\u306f\u30ab\u30b9\u30bf\u30e0Gutenberg\u30d6\u30ed\u30c3\u30af\u3092\u4f7f\u7528\u3057\u3066\u3001WordPress\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u8868\u793a\u3057\u305f\u3044\u3001\u3068\u304a\u8003\u3048\u306e\u4e0a\u7d1a\u8005\u306e\u65b9\u306f\u3001\u305c\u3072\u3053\u306e\u8a18\u4e8b\u3092\u6700\u5f8c\u307e\u3067\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-wordpress-editor\/\">Gutenberg<\/a>\u3068<a href=\"https:\/\/kinsta.com\/blog\/wordpress-tinymce-editor\/\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc<\/a>\u306e\u4e21\u65b9\u3067\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3059\u308b\u30d9\u30b9\u30c8\u306a\u65b9\u6cd5\u306f\u3001\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3068Gutenberg\u306e\u4e21\u65b9\u306b\u5bfe\u5fdc\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u4e21\u65b9\u306e\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u7ba1\u7406\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u306f\u3001\u3084\u3084\u8907\u96d1\u306b\u306a\u308a\u307e\u3059\u304c\u3054\u5b89\u5fc3\u3092\u3002\u3053\u306e\u8a18\u4e8b\u3067\u3001\u305d\u306e\u624b\u9806\u3092\u3067\u304d\u308b\u3060\u3051\u308f\u304b\u308a\u3084\u3059\u304f\u3054\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u30b3\u30f3\u30bb\u30d7\u30c8\u3092\u7406\u89e3\u3067\u304d\u308c\u3070\u3001Gutenberg\u3067\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u7ba1\u7406\u3057\u3001\u3042\u3089\u3086\u308b\u7a2e\u985e\u306e\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u30b9\u30ad\u30eb\u304c\u8eab\u306b\u3064\u304f\u306f\u305a\u3002<\/p>\n<p><aside role=\"note\" class=\"wp-block-kinsta-notice is-style-info\">\n            <h3>Info<\/h3>\n        <p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-node-js\/\">Node.js<\/a>\u3068<a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-npm\/\">npm<\/a>\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-react-js\/\">React<\/a>\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-javascript\/\">JavaScript<\/a>\u306a\u3069\u306e\u6280\u8853\u306b\u7cbe\u901a\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u307e\u3059\u3002\u307e\u305f\u3001WordPress\u958b\u767a\u306b\u95a2\u3059\u308b\u57fa\u672c\u7684\u306a\u77e5\u8b58\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>Gutenberg\u30d6\u30ed\u30c3\u30af\u306e\u958b\u767a\u306b\u6163\u308c\u3066\u3044\u306a\u3044\u65b9\u306f\u3001\u307e\u305a\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/\">Gutenberg\u30d6\u30ed\u30c3\u30af\u958b\u767a\u5fb9\u5e95\u89e3\u8aac<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/blog\/dynamic-blocks\/\">Gutenberg\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30d6\u30ed\u30c3\u30af\u306e\u4f5c\u6210\u65b9\u6cd5<\/a><\/li>\n<\/ul>\n<p>\u307e\u305f\u3001<a href=\"https:\/\/kinsta.com\/courses\/course\/gutenberg-block-development\/\">\u30ab\u30b9\u30bf\u30e0Gutenberg\u30d6\u30ed\u30c3\u30af\u958b\u767a<\/a>\u306e\u52d5\u753b\u30ec\u30c3\u30b9\u30f3\u3082\u3054\u7528\u610f\u3057\u3066\u3044\u307e\u3059\u3002<span style=\"font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size: 1rem\"><\/p>\n<\/aside>\n<\/span><\/p>\n<p><strong>\u6ce8\u610f\uff09\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u306b<\/strong><a href=\"https:\/\/kinsta.com\/jp\/blog\/how-to-install-node-js\/\"><strong>Node.js\u306e\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3<\/strong><\/a><strong>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/strong><\/p>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<div><\/div><kinsta-auto-toc heading=\"Table of Contents\" exclude=\"last\" list-style=\"arrow\" selector=\"h2\" count-number=\"-1\"><\/kinsta-auto-toc><\/p>\n<h2>\u516c\u5f0f\u30c4\u30fc\u30ebcreate-block\u3067\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210<\/h2>\n<p>\u307e\u305a\u6700\u521d\u306b\u3001\u30d6\u30ed\u30c3\u30af\u30bf\u30a4\u30d7\u3092\u767b\u9332\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u306b\u5fc5\u8981\u306b\u306a\u308b\u3001\u3059\u3079\u3066\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u4f9d\u5b58\u95a2\u4fc2\u3092\u6e96\u5099\u3057\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3001\u8868\u793a\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af\u30bf\u30a4\u30d7\u3092\u7c21\u5358\u306b\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d6\u30ed\u30c3\u30af\u30bf\u30a4\u30d7\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u516c\u5f0f\u306e<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-create-block\/\">create-block<\/a>\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/#create-block\">create-block\u30c4\u30fc\u30eb\u306e\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306f\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u958b\u304d\u3001<a href=\"https:\/\/kinsta.com\/jp\/wordpress-hosting\/staging\/\">WordPress\u958b\u767a\u30b5\u30a4\u30c8<\/a>\u306e<strong>plugins<\/strong>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">npx @wordpress\/create-block<\/code><\/pre>\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u6b21\u306e\u60c5\u5831\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>The template variant to use for this block\uff08\u30d6\u30ed\u30c3\u30af\u306b\u4f7f\u7528\u3059\u308b\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\uff09\uff1a<strong>dynamic<\/strong><\/li>\n<li>The block slug used for identification (also the output folder name)\uff08\u8b58\u5225\u306b\u4f7f\u7528\u3059\u308b\u30d6\u30ed\u30c3\u30af\u30b9\u30e9\u30c3\u30b0\u3001\u51fa\u529b\u30d5\u30a9\u30eb\u30c0\u540d\uff09\uff1a<strong>metadata-block<\/strong><\/li>\n<li>The internal namespace for the block name (something unique for your products)\uff08\u30d6\u30ed\u30c3\u30af\u540d\u306e\u5185\u90e8\u540d\u524d\u7a7a\u9593\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u72ec\u81ea\u306e\u540d\u524d\uff09\uff1a<strong>meta-fields<\/strong><\/li>\n<li>The display title for your block\uff08\u30d6\u30ed\u30c3\u30af\u306e\u8868\u793a\u30bf\u30a4\u30c8\u30eb\uff09\uff1a<strong>Meta Fields<\/strong><\/li>\n<li>The short description for your block (optional)\uff08\u30d6\u30ed\u30c3\u30af\u306e\u77ed\u3044\u8aac\u660e\uff0f\u4efb\u610f\uff09\uff1a<strong>Block description<\/strong><\/li>\n<li>The dashicon to make it easier to identify your block (optional)\uff08\u30d6\u30ed\u30c3\u30af\u3092\u8b58\u5225\u3059\u308b\u30c0\u30c3\u30b7\u30e5\u30a2\u30a4\u30b3\u30f3\uff0f\u4efb\u610f\uff09\uff1a<strong>book<\/strong><\/li>\n<li>The category name to help users browse and discover your block\uff08\u30d6\u30ed\u30c3\u30af\u306e\u95b2\u89a7\u3084\u767a\u898b\u3092\u52a9\u3051\u308b\u30ab\u30c6\u30b4\u30ea\u540d\uff09\uff1a<strong>widgets<\/strong><\/li>\n<li>Do you want to customize the WordPress plugin?\uff08WordPress\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u307e\u3059\u304b\uff1f\uff09\uff1a<strong>Yes\/No<\/strong><\/li>\n<\/ul>\n<p>\u4e0a\u8a18\u306e\u5024\u306f\u3001\u4ee5\u4e0b\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>\u8b58\u5225\u306b\u4f7f\u7528\u3059\u308b\u30d6\u30ed\u30c3\u30af\u30b9\u30e9\u30c3\u30b0<\/strong>\u2500\u30d7\u30e9\u30b0\u30a4\u30f3\u306e<strong>\u30d5\u30a9\u30eb\u30c0\u540d<\/strong>\u3068<strong>\u30c6\u30ad\u30b9\u30c8\u30c9\u30e1\u30a4\u30f3<\/strong><\/li>\n<li><strong>\u30d6\u30ed\u30c3\u30af\u540d\u306e\u5185\u90e8\u540d\u524d\u7a7a\u9593<\/strong>\u2500\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30b3\u30fc\u30c9\u5168\u4f53\u3067\u4f7f\u7528\u3055\u308c\u308b\u30d6\u30ed\u30c3\u30af<strong>\u5185\u90e8\u540d\u524d\u7a7a\u9593<\/strong>\u3068<strong>\u95a2\u6570\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9<\/strong><\/li>\n<li><strong>\u30d6\u30ed\u30c3\u30af\u306e\u8868\u793a\u30bf\u30a4\u30c8\u30eb<\/strong>\u2500<strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u540d<\/strong>\u3068\u30a8\u30c7\u30a3\u30bf\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u4f7f\u7528\u3055\u308c\u308b<strong>\u30d6\u30ed\u30c3\u30af\u540d<\/strong><\/li>\n<\/ul>\n<p>\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u306b\u306f\u30012\uff5e3\u5206\u304b\u304b\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u51e6\u7406\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u5229\u7528\u53ef\u80fd\u306a\u30b3\u30de\u30f3\u30c9\u306e\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142731\" aria-describedby=\"caption-attachment-142731\" style=\"width: 1136px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142731 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/plugin-bootstrapped.jpg\" alt=\"\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u304c\u308f\u304b\u308b\" width=\"1136\" height=\"991\"><figcaption id=\"caption-attachment-142731\" class=\"wp-caption-text\">\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u304c\u308f\u304b\u308b<\/figcaption><\/figure>\n<p>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u9032\u3080\u524d\u306b\u3001<a href=\"https:\/\/kinsta.com\/blog\/linux-commands\/\">\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb<\/a>\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">cd metadata-block\nnpm start<\/code><\/pre>\n<p><aside role=\"note\" class=\"wp-block-kinsta-notice is-style-important\">\n            <h3>Important<\/h3>\n        <p>Gutenberg\u306e\u958b\u767a\u74b0\u5883\u3092\u8d77\u52d5\u3059\u308b\u969b\u306f\u3001\u305d\u306e\u90fd\u5ea6\u5fc5\u305a<code>npm star<\/code>t\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>npm start<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u5185\u3067watcher\u304c\u5b9f\u884c\u3055\u308c\u3001\u5909\u66f4\u5f8c\u306eJS\u30d5\u30a1\u30a4\u30eb\u3084CSS\u30d5\u30a1\u30a4\u30eb\u3092\u30ea\u30d3\u30eb\u30c9\u3057\u307e\u3059\uff08<a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/javascript\/js-build-setup\/#development-mode\">\u8a73\u7d30\u306f\u3053\u3061\u3089<\/a>\uff09\u3002<span style=\"font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size: 1rem\"><\/p>\n<\/aside>\n<\/span><\/p>\n<p>\u3053\u308c\u3067\u30b3\u30fc\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30e1\u30a4\u30f3PHP\u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u3001\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u7528\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u524d\u306b\u3001<a href=\"https:\/\/wordpress.org\/plugins\/classic-editor\/\"><strong>Classic Editor<\/strong><\/a><strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u6709\u52b9\u5316<\/strong>\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u753b\u9762\u3092\u958b\u3044\u3066\u3001<strong>Meta Fields<\/strong>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_143199\" aria-describedby=\"caption-attachment-143199\" style=\"width: 1726px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-143199 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/activate-plugins.jpg\" alt=\"\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6709\u52b9\u5316\" width=\"1726\" height=\"878\"><figcaption id=\"caption-attachment-143199\" class=\"wp-caption-text\">\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u6709\u52b9\u5316<\/figcaption><\/figure>\n<h2>\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3078\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306e\u8ffd\u52a0<\/h2>\n<p><a href=\"https:\/\/kinsta.com\/jp\/blog\/disable-gutenberg-wordpress-editor\/\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc<\/a>\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u8981\u7d20\u3092\u4fdd\u6301\u3059\u308b\u30b3\u30f3\u30c6\u30ca\u3067\u3059\u3002\u6295\u7a3f\u8005\u3001\u30bf\u30b0\u3001\u30ab\u30c6\u30b4\u30ea\u306a\u3069\u3001\u7279\u5b9a\u306e\u60c5\u5831\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u7d44\u307f\u8fbc\u307f\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306b\u52a0\u3048\u3066\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u958b\u767a\u8005\u306f\u3001<a href=\"https:\/\/developer.wordpress.org\/plugins\/metadata\/custom-meta-boxes\/\">\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9<\/a>\u3092\u597d\u304d\u306a\u3060\u3051\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306b\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u56fa\u6709\u306e\u30c7\u30fc\u30bf\u3092\u5165\u529b\u3059\u308bHTML\u30d5\u30a9\u30fc\u30e0\u8981\u7d20\uff08\u307e\u305f\u306f\u4efb\u610f\u306e<a href=\"https:\/\/kinsta.com\/blog\/learn-html\/\">HTML\u30b3\u30f3\u30c6\u30f3\u30c4<\/a>\uff09\u3092\u633f\u5165\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-api\/\">WordPress API<\/a>\u306b\u306f\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u7c21\u5358\u306b\u767b\u9332\u3067\u304d\u308b\u4fbf\u5229\u306a\u6a5f\u80fd\u304c\u3042\u308a\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u52d5\u4f5c\u306b\u5fc5\u8981\u306a\u3059\u3079\u3066\u306eHTML\u8981\u7d20\u3092\u633f\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u306f\u3001\u4f5c\u6210\u3057\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u306ePHP\u30d5\u30a1\u30a4\u30eb\u306b\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-php\">\/\/ register meta box\nfunction meta_fields_add_meta_box(){\n\tadd_meta_box(\n\t\t'meta_fields_meta_box', \n\t\t__( 'Book details' ), \n\t\t'meta_fields_build_meta_box_callback', \n\t\t'post',\n\t\t'side',\n\t\t'default'\n\t );\n}\n\n\/\/ build meta box\nfunction meta_fields_build_meta_box_callback( $post ){\n\t  wp_nonce_field( 'meta_fields_save_meta_box_data', 'meta_fields_meta_box_nonce' );\n\t  $title = get_post_meta( $post-&gt;ID, '_meta_fields_book_title', true );\n\t  $author = get_post_meta( $post-&gt;ID, '_meta_fields_book_author', true );\n\t  ?&gt;\n\t  &lt;div class=\"inside\"&gt;\n\t  \t  &lt;p&gt;&lt;strong&gt;Title&lt;\/strong&gt;&lt;\/p&gt;\n\t\t  &lt;p&gt;&lt;input type=\"text\" id=\"meta_fields_book_title\" name=\"meta_fields_book_title\" value=\"&lt;?php echo esc_attr( $title ); ?&gt;\" \/&gt;&lt;\/p&gt;\t\n\t\t  &lt;p&gt;&lt;strong&gt;Author&lt;\/strong&gt;&lt;\/p&gt;\n\t\t  &lt;p&gt;&lt;input type=\"text\" id=\"meta_fields_book_author\" name=\"meta_fields_book_author\" value=\"&lt;?php echo esc_attr( $author ); ?&gt;\" \/&gt;&lt;\/p&gt;\n\t  &lt;\/div&gt;\n\t  &lt;?php\n}\nadd_action( 'add_meta_boxes', 'meta_fields_add_meta_box' );<\/code><\/pre>\n<p><code>add_meta_box<\/code>\u95a2\u6570\u306f\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3057\u3001\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306f\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306b\u633f\u5165\u3055\u308c\u308bHTML\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u3001\u4eca\u56de\u306f\u6398\u308a\u4e0b\u3052\u307e\u305b\u3093\u304c\u3001\u6c17\u306b\u306a\u308b\u65b9\u306f\u3001WordPress\u306e<a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/add_meta_boxes\/\">\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3001\u307e\u305f\u306f<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_meta_box\/\">\u3053\u3061\u3089\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305f\u3001<a href=\"https:\/\/www.smashingmagazine.com\/2011\/10\/create-custom-post-meta-boxes-wordpress\/\">\u3053\u306e\u8a18\u4e8b<\/a>\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u6295\u7a3f\u8005\u304c\u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u3001<code>save_post<\/code><a href=\"https:\/\/kinsta.com\/blog\/wordpress-hooks\/\">\u30d5\u30c3\u30af<\/a>\u304c\u30c8\u30ea\u30ac\u30fc\u3055\u308c\u305f\u969b\u306b\u4fdd\u5b58\u3059\u308b\u95a2\u6570\u3092\u4f5c\u6210\u3057\u307e\u3059\uff08<a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/save_post\/\">Developer Resources<\/a>\u3092\u53c2\u7167\uff09\u3002<\/p>\n<pre><code class=\"language-php\">\/\/ save metadata\nfunction meta_fields_save_meta_box_data( $post_id ) {\n\tif ( ! isset( $_POST['meta_fields_meta_box_nonce'] ) )\n\t\treturn;\n\tif ( ! wp_verify_nonce( $_POST['meta_fields_meta_box_nonce'], 'meta_fields_save_meta_box_data' ) )\n\t\treturn;\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n\t\treturn;\n\tif ( ! current_user_can( 'edit_post', $post_id ) )\n\t\treturn;\n\n\tif ( ! isset( $_POST['meta_fields_book_title'] ) )\n\t\treturn;\n\tif ( ! isset( $_POST['meta_fields_book_author'] ) )\n\t\treturn;\n\n\t$title = sanitize_text_field( $_POST['meta_fields_book_title'] );\n\t$author = sanitize_text_field( $_POST['meta_fields_book_author'] );\n\n\tupdate_post_meta( $post_id, '_meta_fields_book_title', $title );\n\tupdate_post_meta( $post_id, '_meta_fields_book_author', $author );\n}\nadd_action( 'save_post', 'meta_fields_save_meta_box_data' );<\/code><\/pre>\n<p>\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u3053\u3067\u306f\u3001\u30e1\u30bf\u30ad\u30fc\u306e\u524d\u306b\u3042\u308b\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2\u6587\u5b57\uff08<code>_<\/code>\uff09\u306b\u3064\u3044\u3066\u3060\u3051\u898b\u3066\u3044\u304d\u307e\u3059\u3002\u30a2\u30f3\u30c0\u30fc\u30b9\u30b3\u30a2\u6587\u5b57\u3092\u4ed8\u3051\u308b\u3068\u3001WordPress\u306b\u5bfe\u3057\u3066\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5229\u7528\u53ef\u80fd\u306a\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u4e00\u89a7\u304b\u3089\u3001\u3053\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30ad\u30fc\u3092\u96a0\u3059\u3088\u3046\u306b\u6307\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u5185\u3067\u306e\u307f\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u306e\u753b\u50cf\u306f\u3001\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u8868\u793a\u3057\u305f\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3067\u3059\u3002<\/p>\n<figure id=\"attachment_142726\" aria-describedby=\"caption-attachment-142726\" style=\"width: 2154px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142726 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-meta-box.jpg\" alt=\"\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\" width=\"2154\" height=\"1040\"><figcaption id=\"caption-attachment-142726\" class=\"wp-caption-text\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9<\/figcaption><\/figure>\n<p>\u3053\u3053\u3067Classic Editor\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u7121\u52b9\u306b\u3057\u3066\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-wordpress-editor\/\">\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc<\/a>\u3067\u306e\u898b\u3048\u65b9\u3082\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306f\u307e\u3060\u8868\u793a\u3055\u308c\u3001\u6a5f\u80fd\u3059\u308b\u3082\u306e\u306e\u3001\u671f\u5f85\u3057\u305f\u3082\u306e\u3068\u306f\u307b\u3069\u9060\u3044\u72b6\u614b\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306e\u30c6\u30fc\u30de\u306f\u3001\u6295\u7a3f\u8a18\u4e8b\u3084<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-custom-post-types\/\">\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u30bf\u30a4\u30d7<\/a>\u306b\u6dfb\u4ed8\u3055\u308c\u305f\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u30b7\u30b9\u30c6\u30e0\u306e\u4f5c\u6210\u3068\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u5185\u3067\u306e\u900f\u904e\u7684\u306a\u7d71\u5408\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u4e0a\u306b\u3054\u7d39\u4ecb\u3057\u305f\u30b3\u30fc\u30c9\u306f\u3001\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3068\u306e\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u305f\u3081\u3060\u3051\u306b\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u624b\u9806\u306b\u79fb\u308b\u524d\u306b\u3001<code>add_meta_box<\/code>\u95a2\u6570\u306b<code>__back_compat_meta_box<\/code>\u30d5\u30e9\u30b0\u3092\u8ffd\u52a0\u3057\u3066\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u306f\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u524a\u9664\u3059\u308b\u3088\u3046\u306bWordPress\u306b\u901a\u77e5\u3057\u307e\u3059\uff08<a href=\"https:\/\/make.wordpress.org\/core\/2018\/11\/07\/meta-box-compatibility-flags\/\">\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u4e92\u63db\u30d5\u30e9\u30b0<\/a>\u3068<a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/metabox\/#backward-compatibility\">\u5f8c\u65b9\u4e92\u63db\u6027<\/a>\u3082\u53c2\u7167\uff09\u3002<\/p>\n<p>\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3059\u308b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306b\u623b\u308a\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">\/\/ register meta box\nfunction meta_fields_add_meta_box(){\n\tadd_meta_box(\n\t\t'meta_fields_meta_box', \n\t\t__( 'Book details' ), \n\t\t'meta_fields_build_meta_box_callback', \n\t\t'post', \n\t\t'side',\n\t\t'default',\n\t\t\/\/ hide the meta box in Gutenberg\n\t\tarray('__back_compat_meta_box' =&gt; true)\n\t );\n}<\/code><\/pre>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u3001WordPress\u306e\u7ba1\u7406\u753b\u9762\u306b\u623b\u308a\u307e\u3057\u3087\u3046\u3002\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u306b\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u518d\u5ea6\u6709\u52b9\u5316\u3059\u308b\u3068\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u304c\u518d\u3073\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>Gutenberg\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3078\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u8ffd\u52a0\uff083\u3064\u306e\u9078\u629e\u80a2\uff09<\/h2>\n<p>Gutenberg\u306e\u30d6\u30ed\u30c3\u30af\u958b\u767a\u306b\u95a2\u3059\u308b\u8a18\u4e8b\u3067\u306f\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u6982\u8981\u3084\u30d1\u30fc\u30c4\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/\">\u9759\u7684\u30d6\u30ed\u30c3\u30af<\/a>\u3068<a href=\"https:\/\/kinsta.com\/blog\/dynamic-blocks\/\">\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30d6\u30ed\u30c3\u30af<\/a>\u306e\u958b\u767a\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u3054\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u524d\u8ff0\u3057\u305f\u3088\u3046\u306b\u3001\u4eca\u56de\u306f\u3055\u3089\u306b\u4e00\u6b69\u8e0f\u307f\u8fbc\u3093\u3067\u3001\u6295\u7a3f\u8a18\u4e8b\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>Gutenberg\u5185\u3067\u6295\u7a3f\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3001\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306f\u8907\u6570\u3042\u308a\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\u306e3\u3064\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002<span style=\"font-family: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;font-size: 1rem\"><div><\/div><kinsta-auto-toc list-style=\"disc\" selector=\"h3\" count-number=\"3\" sub-toc=\"true\"><\/kinsta-auto-toc><\/span><\/p>\n<h3>\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4fdd\u5b58\u3001\u8868\u793a\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af\u306e\u4f5c\u6210<\/h3>\n<p>\u306f\u3058\u3081\u306b\u3001<strong>\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30d6\u30ed\u30c3\u30af<\/strong>\u5185\u304b\u3089\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f5c\u6210\u3001\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u30cf\u30f3\u30c9\u30d6\u30c3\u30af\u306b\u3088\u308b\u3068\u3001<a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/metabox\/#step-1-register-meta-field\">\u6295\u7a3f\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9<\/a>\u306f\u300c\u6295\u7a3f\u306b\u95a2\u3059\u308b\u8ffd\u52a0\u30c7\u30fc\u30bf\u306e\u4fdd\u5b58\u306b\u4f7f\u7528\u3055\u308c\u308bWordPress\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u300d\u3067\u3059\u3002\u307e\u305a\u306f\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u65b0\u898f\u767b\u9332\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u767b\u9332<\/h4>\n<p>\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b\u524d\u306b\u3001\u4f7f\u7528\u3059\u308b<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-custom-post-types\/\">\u6295\u7a3f\u30bf\u30a4\u30d7<\/a>\u306e\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30b5\u30dd\u30fc\u30c8\u306e\u6709\u7121\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b\u969b\u306b\u306f\u3001<code>show_in_rest<\/code>\u30d1\u30e9\u30e1\u30fc\u30bf\u3092<code>true<\/code>\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3067\u306f\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u623b\u3063\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059<\/p>\n<pre><code class=\"language-php\">\/**\n * Register the custom meta fields\n *\/\nfunction meta_fields_register_meta() {\n\n    $metafields = [ '_meta_fields_book_title', '_meta_fields_book_author' ];\n\n    foreach( $metafields as $metafield ){\n        \/\/ Pass an empty string to register the meta key across all existing post types.\n        register_post_meta( '', $metafield, array(\n            'show_in_rest' =&gt; true,\n            'type' =&gt; 'string',\n            'single' =&gt; true,\n            'sanitize_callback' =&gt; 'sanitize_text_field',\n            'auth_callback' =&gt; function() { \n                return current_user_can( 'edit_posts' );\n            }\n        ));\n    }  \n}\nadd_action( 'init', 'meta_fields_register_meta' );<\/code><\/pre>\n<p><code>register_post_meta<\/code>\u306f\u3001\u6307\u5b9a\u3057\u305f\u6295\u7a3f\u30bf\u30a4\u30d7\u306b\u5bfe\u3057\u3066\u30e1\u30bf\u30ad\u30fc\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u4e0a\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u6295\u7a3f\u30bf\u30a4\u30d7\u306e\u3046\u3061\u3001\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3059\u3079\u3066\u306e\u6295\u7a3f\u30bf\u30a4\u30d7\u306b\u5bfe\u3057\u3066\u30012\u3064\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u8a73\u3057\u304f\u306f<a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/register_post_meta\/\">\u95a2\u6570\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u306e<strong>src\/index.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u307e\u3059\u3002<\/p>\n<h4>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u4e0a\u3067\u306e\u30d6\u30ed\u30c3\u30af\u30bf\u30a4\u30d7\u306e\u767b\u9332<\/h4>\n<p><strong>wp-content\/plugins\/metadata-block\/src<\/strong>\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3001<strong>index.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-js\">import { registerBlockType } from '@wordpress\/blocks';\nimport '.\/style.scss';\nimport Edit from '.\/edit';\nimport metadata from '.\/block.json';\n\nregisterBlockType( metadata.name, {\n\tedit: Edit,\n} );<\/code><\/pre>\n<p>\u9759\u7684\u30d6\u30ed\u30c3\u30af\u3067\u3042\u308c\u3070<code><a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/#indexjs\">save<\/a><\/code><a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/#indexjs\">\u95a2\u6570<\/a>\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u30c0\u30a4\u30ca\u30df\u30c3\u30af\u30d6\u30ed\u30c3\u30af\u3092\u5c0e\u5165\u3057\u305f\u305f\u3081<code>save<\/code>\u95a2\u6570\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u306b\u8868\u793a\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u306f\u3001PHP\u306b\u3088\u3063\u3066\u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>\u30d6\u30ed\u30c3\u30af\u30bf\u30a4\u30d7\u306e\u69cb\u7bc9<\/h4>\n<p><strong>wp-content\/plugins\/metadata-block\/src<\/strong>\u30d5\u30a9\u30eb\u30c0\u306b\u79fb\u52d5\u3057\u3001<strong>edit.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\uff08\u30b3\u30e1\u30f3\u30c8\u306f\u524a\u9664\uff09\u3002<\/p>\n<pre><code class=\"language-js\">import { __ } from '@wordpress\/i18n';\nimport { useBlockProps } from '@wordpress\/block-editor';\nimport '.\/editor.scss';\n\nexport default function Edit() {\n\treturn (\n\t\t&lt;p { ...useBlockProps() }&gt;\n\t\t\t{ __( 'Meta Fields \u2013 hello from the editor!', 'metadata-block' ) }\n\t\t&lt;\/p&gt;\n\t);\n}<\/code><\/pre>\n<p>\u3053\u3053\u306b\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308b\u30d6\u30ed\u30c3\u30af\u306e\u751f\u6210\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u3057\u3066\u3001\u30d6\u30ed\u30c3\u30af\u306e\u69cb\u7bc9\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u95a2\u6570\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u3001\u3059\u3079\u3066\u306e\u4f9d\u5b58\u95a2\u4fc2\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-js\">import { __ } from '@wordpress\/i18n';\nimport { useBlockProps, InspectorControls, RichText } from '@wordpress\/block-editor';\nimport { useSelect } from '@wordpress\/data';\nimport { useEntityProp } from '@wordpress\/core-data';\nimport { TextControl, PanelBody, PanelRow } from '@wordpress\/components';\nimport '.\/editor.scss';<\/code><\/pre>\n<p>\u3053\u308c\u307e\u3067\u306e\u95a2\u9023\u8a18\u4e8b\u3092\u3054\u89a7\u306b\u306a\u3063\u3066\u3044\u308c\u3070\u3001<code><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Statements\/import\">import<\/a><\/code><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Statements\/import\">\u5ba3\u8a00<\/a>\u306e\u591a\u304f\u306f\u3054\u5b58\u77e5\u306e\u306f\u305a\u3002\u4ee5\u4e0b\u306f\u3001\u305d\u306e\u4e00\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-js\">import { useSelect } from '@wordpress\/data';\nimport { useEntityProp } from '@wordpress\/core-data';<\/code><\/pre>\n<p>\u4f9d\u5b58\u95a2\u4fc2\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u3068\u3001<code>Edit()<\/code>\u95a2\u6570\u5185\u306e<code>useSelect<\/code>\u3068<code>useEntityProp<\/code>\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-js\">const postType = useSelect(\n\t\t( select ) =&gt; select( 'core\/editor' ).getCurrentPostType(),\n\t\t[]\n\t);\nconst [ meta, setMeta ] = useEntityProp( 'postType', postType, 'meta' );<\/code><\/pre>\n<ul>\n<li><code>useSelect<\/code>\u30ab\u30b9\u30bf\u30e0\u30d5\u30c3\u30af\u306f\u3001<a href=\"https:\/\/kinsta.com\/blog\/dynamic-blocks\/#build-the-block-to-be-rendered-in-the-editor\">\u767b\u9332\u3055\u308c\u305f\u30bb\u30ec\u30af\u30bf\u304b\u3089props\u3092\u53d6\u5f97<\/a>\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u73fe\u5728\u306e\u6295\u7a3f\u30bf\u30a4\u30d7\u306e\u53d6\u5f97\u306b\u4f7f\u7528\uff08<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-data\/#useselect\">@wordpress\/data\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9<\/a>\u3068<a href=\"https:\/\/make.wordpress.org\/core\/2019\/06\/10\/introducing-usedispatch-and-useselect\/\">useDispatch\u3068useSelect\u306e\u7d39\u4ecb<\/a>\u3082\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002<\/li>\n<li><code>useEntityProp<\/code>\u30ab\u30b9\u30bf\u30e0\u30d5\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30d6\u30ed\u30c3\u30af\u306f\u6295\u7a3f\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u53d6\u5f97\u3001\u5909\u66f4\u53ef\u80fd\u3002<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/33d84b036592a5bf31af05b7710f3b2b14163dc4\/packages\/core-data\/src\/entity-provider.js#L85\">\u5b9a\u7fa9<\/a>\u306b\u3088\u308b\u3068\u3001\u300c\u3053\u306e\u30d5\u30c3\u30af\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u30bf\u30a4\u30d7\u306e\u6700\u3082\u8fd1\u3044\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u3001\u6307\u5b9a\u3055\u308c\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5024\u3068\u30bb\u30c3\u30bf\u30fc\u3092\u8fd4\u3059\u300d\u3002\u8fd4\u3055\u308c\u308b\u306e\u306f\u300c\u914d\u5217\u3067\u3001\u6700\u521d\u306e\u9805\u76ee\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u5024\u30012\u756a\u76ee\u306e\u9805\u76ee\u306f\u30bb\u30c3\u30bf\u30fc\u30013\u756a\u76ee\u306e\u9805\u76ee\u306fREST API\u304b\u3089\u306e\u5b8c\u5168\u306a\u5024\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3001<code>raw<\/code>\u3001<code>rendered<\/code>\u3001<code>protected props<\/code>\u306a\u3069\u306e\u8a73\u7d30\u60c5\u5831\u3092\u542b\u3080\u300d\uff08<a href=\"https:\/\/make.wordpress.org\/core\/2020\/03\/02\/general-block-editor-api-updates\/\">\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u5168\u822c\u306eAPI\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u95a2\u3059\u308b\u30da\u30fc\u30b8<\/a>\u3082\u3054\u89a7\u304f\u3060\u3055\u3044\uff09\u3002<\/li>\n<\/ul>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u73fe\u5728\u306e<code>postType<\/code>\u3001\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08<code>meta<\/code>\uff09\u3001\u305d\u308c\u3089\u3092\u66f4\u65b0\u3059\u308b\u30bb\u30c3\u30bf\u30fc\u95a2\u6570\uff08<code>setMeta<\/code>\uff09\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p><code>Edit()<\/code>\u95a2\u6570\u306e\u73fe\u5728\u306e\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7f6e\u304d\u63db\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-js\">export default function Edit() {\n\tconst blockProps = useBlockProps();\n\tconst postType = useSelect(\n\t\t( select ) =&gt; select( 'core\/editor' ).getCurrentPostType(),\n\t\t[]\n\t);\n\tconst [ meta, setMeta ] = useEntityProp( 'postType', postType, 'meta' );\n\tconst bookTitle = meta[ '_meta_fields_book_title' ];\n\tconst bookAuthor = meta[ '_meta_fields_book_author' ];\n\tconst updateBookTitleMetaValue = ( newValue ) =&gt; {\n\t\tsetMeta( { ...meta, _meta_fields_book_title: newValue } );\n    };\n\tconst updateBookAuthorMetaValue = ( newValue ) =&gt; {\n\t\tsetMeta( { ...meta, _meta_fields_book_author: newValue } );\n\t};\nreturn ( ... );\n}<\/code><\/pre>\n<ul>\n<li><code>useSelect<\/code>\u3092\u4f7f\u7528\u3057\u3066\u3001\u73fe\u5728\u306e\u6295\u7a3f\u30bf\u30a4\u30d7\u3092\u53d6\u5f97\u3059\u308b<\/li>\n<li style=\"text-align: center\"><code>useEntityProp<\/code>\u306f\u3001\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u914d\u5217\u3068\u3001\u65b0\u3057\u3044\u30e1\u30bf\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u30bb\u30c3\u30bf\u30fc\u95a2\u6570\u3092\u8fd4\u3059<\/li>\n<li><code>updateBookTitleMetaValue<\/code>\u3068<code>updateBookAuthorMetaValue<\/code>\u306f\u3001\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u4fdd\u5b58\u3059\u308b2\u3064\u306e\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9<\/li>\n<\/ul>\n<p>\u7d9a\u3044\u3066\u3001<code>Edit()<\/code>\u95a2\u6570\u304c\u8fd4\u3059JSX\uff08JavaScript XML\uff09\u30b3\u30fc\u30c9\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-jsx\">export default function Edit() {\n\t...\n\treturn (\n\t\t&lt;&gt;\n\t\t\t&lt;InspectorControls&gt;\n\t\t\t\t&lt;PanelBody \n\t\t\t\t\ttitle={ __( 'Book Details' )}\n\t\t\t\t\tinitialOpen={true}\n\t\t\t\t&gt;\n\t\t\t\t\t&lt;PanelRow&gt;\n\t\t\t\t\t\t&lt;fieldset&gt;\n\t\t\t\t\t\t\t&lt;TextControl\n\t\t\t\t\t\t\t\tlabel={__( 'Book title' )}\n\t\t\t\t\t\t\t\tvalue={ bookTitle }\n\t\t\t\t\t\t\t\tonChange={ updateBookTitleMetaValue }\n\t\t\t\t\t\t\t\/&gt;\n\t\t\t\t\t\t&lt;\/fieldset&gt;\n\t\t\t\t\t&lt;\/PanelRow&gt;\n\t\t\t\t\t&lt;PanelRow&gt;\n\t\t\t\t\t\t&lt;fieldset&gt;\n\t\t\t\t\t\t\t&lt;TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Book author' ) }\n\t\t\t\t\t\t\t\tvalue={ bookAuthor }\n\t\t\t\t\t\t\t\tonChange={ updateBookAuthorMetaValue }\n\t\t\t\t\t\t\t\/&gt;\n\t\t\t\t\t\t&lt;\/fieldset&gt;\n\t\t\t\t\t&lt;\/PanelRow&gt;\n\t\t\t\t&lt;\/PanelBody&gt;\n\t\t\t&lt;\/InspectorControls&gt;\n\t\t\t&lt;div { ...blockProps }&gt;\n\t\t\t\t&lt;RichText \n\t\t\t\t\ttagName=\"h3\"\n\t\t\t\t\tonChange={ updateBookTitleMetaValue }\n\t\t\t\t\tallowedFormats={ [ 'core\/bold', 'core\/italic' ] }\n\t\t\t\t\tvalue={ bookTitle }\n\t\t\t\t\tplaceholder={ __( 'Write your text...' ) }\n\t\t\t\t\/&gt;\n\t\t\t\t&lt;TextControl\n\t\t\t\t\tlabel=\"Book Author\"\n\t\t\t\t\tvalue={ bookAuthor }\n\t\t\t\t\tonChange={ updateBookAuthorMetaValue }\n\t\t\t\t\/&gt;\n\t\t\t&lt;\/div&gt;\n\t\t&lt;\/&gt;\n\t);\n}<\/code><\/pre>\n<p><code>RichText<\/code>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Global_attributes\/contenteditable\">contenteditable<\/a>\uff08\u30b3\u30f3\u30c6\u30f3\u30c4\u7de8\u96c6\u53ef\u80fd\uff09\u306a\u5165\u529b\u3092\u3001<code>TextControl<\/code>\u306f\u5358\u7d14\u306a\u30c6\u30ad\u30b9\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30d6\u30ed\u30c3\u30af\u306b\u542b\u307e\u308c\u308b2\u3064\u306e\u30d5\u30a9\u30fc\u30e0\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u306e\u4ee3\u308f\u308a\u306b\u3001\u5165\u529b\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u542b\u3080\u30b5\u30a4\u30c9\u30d0\u30fc\u30d1\u30cd\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3066\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u306b\u623b\u308a\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30a4\u30f3\u30b5\u30fc\u30bf\u30fc\u304b\u3089<strong>Meta Fields<\/strong>\u30d6\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3057\u3066\u3001\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u3068\u8457\u8005\u3092\u8a18\u5165\u3057\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142769\" aria-describedby=\"caption-attachment-142769\" style=\"width: 1796px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142769 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-block-with-2-meta-fields.jpg\" alt=\"2\u3064\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u542b\u3080\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af\" width=\"1796\" height=\"880\"><figcaption id=\"caption-attachment-142769\" class=\"wp-caption-text\">2\u3064\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u542b\u3080\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af<\/figcaption><\/figure>\n<p>\u30d6\u30ed\u30c3\u30af\u5185\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u5bfe\u5fdc\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3082\u5909\u66f4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3067\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u308bHTML\u3092\u751f\u6210\u3059\u308bPHP\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<h4>\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3067\u306e\u30d6\u30ed\u30c3\u30af\u306e\u8868\u793a<\/h4>\n<p>\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u518d\u3073\u30e1\u30a4\u30f3\u306ePHP\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u30d6\u30ed\u30c3\u30af\u306e\u51fa\u529b\u3092\u751f\u6210\u3059\u308b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">function meta_fields_metadata_block_block_init() {\n\tregister_block_type(\n\t\t__DIR__ . '\/build',\n\t\tarray(\n\t\t\t'render_callback' =&gt; 'meta_fields_metadata_block_render_callback',\n\t\t)\n\t);\n}\nadd_action( 'init', 'meta_fields_metadata_block_block_init' );\n\nfunction meta_fields_metadata_block_render_callback( $attributes, $content, $block ) {\n\t\n\t$book_title = get_post_meta( get_the_ID(), '_meta_fields_book_title', true );\n\t$book_author = get_post_meta( get_the_ID(), '_meta_fields_book_author', true );\n    \n\t$output = \"\";\n\n\tif( ! empty( $book_title ) ){\n\t\t$output .= '&lt;h3&gt;' . esc_html( $book_title ) . '&lt;\/h3&gt;';\n\t}\n\tif( ! empty( $book_author ) ){\n\t\t$output .= '&lt;p&gt;' . __( 'Book author: ' ) . esc_html( $book_author ) . '&lt;\/p&gt;';\n\t}\n\tif( strlen( $output ) &gt; 0 ){\n\t\treturn '&lt;div ' . get_block_wrapper_attributes() . '&gt;' . $output . '&lt;\/div&gt;';\n\t} else {\n\t\treturn '&lt;div ' . get_block_wrapper_attributes() . '&gt;' . '&lt;strong&gt;' . __( 'Sorry. No fields available here!' ) . '&lt;\/strong&gt;' . '&lt;\/div&gt;';\n\t}\n}<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306f\u975e\u5e38\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u3001\u307e\u305a<code>get_post_meta<\/code>\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u6b21\u306b\u3053\u306e\u5024\u3092\u4f7f\u7528\u3057\u3066\u3001\u30d6\u30ed\u30c3\u30af\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u304b\u3089\u30d6\u30ed\u30c3\u30af\u306eHTML\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0a\u3067\u3001\u30d6\u30ed\u30c3\u30af\u306e\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002\u3053\u306e\u4f8b\u3067\u306f\u610f\u56f3\u7684\u306b\u3067\u304d\u308b\u3060\u3051\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001Gutenberg\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u3088\u308a\u9ad8\u5ea6\u306a\u30d6\u30ed\u30c3\u30af\u3092\u69cb\u7bc9\u3057\u3066\u3001WordPress\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u30d5\u30eb\u6d3b\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142768\" aria-describedby=\"caption-attachment-142768\" style=\"width: 1796px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142768 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-block-with-custom-meta-fields.jpg\" alt=\"\u8907\u6570\u306e\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u542b\u3080\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af\" width=\"1796\" height=\"1260\"><figcaption id=\"caption-attachment-142768\" class=\"wp-caption-text\">\u8907\u6570\u306e\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u542b\u3080\u30ab\u30b9\u30bf\u30e0\u30d6\u30ed\u30c3\u30af<\/figcaption><\/figure>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<code>h3<\/code>\u8981\u7d20\u3068<code>p<\/code>\u8981\u7d20\u3092\u4f7f\u7528\u3057\u3066\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u7528\u306e\u30d6\u30ed\u30c3\u30af\u3092\u69cb\u7bc9\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u30c7\u30fc\u30bf\u306f\u3001\u3053\u308c\u4ee5\u5916\u306e\u69d8\u3005\u306a\u65b9\u6cd5\u3067\u8868\u793a\u3067\u304d\u307e\u3059\u3002\u6b21\u306e\u4f8b\u3067\u306f\u3001\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5358\u7d14\u306a\u9806\u5e8f\u306a\u3057\u30ea\u30b9\u30c8\u3067\u8868\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142770\" aria-describedby=\"caption-attachment-142770\" style=\"width: 1794px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142770 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-block-on-the-front-end.jpg\" alt=\"\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u4e0a\u306e\u30b5\u30f3\u30d7\u30eb\u30d6\u30ed\u30c3\u30af\" width=\"1794\" height=\"1132\"><figcaption id=\"caption-attachment-142770\" class=\"wp-caption-text\">\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u4e0a\u306e\u30b5\u30f3\u30d7\u30eb\u30d6\u30ed\u30c3\u30af<\/figcaption><\/figure>\n<p>\u3053\u306e\u4f8b\u306e\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u306f\u3001<a href=\"https:\/\/gist.github.com\/carlodaniele\/d44ca1d76457fa6553f44ed863ecdbcd\">\u516c\u958b\u3055\u308c\u305fgist<\/a>\u3067\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u3078\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u306e\u8ffd\u52a0<\/h3>\n<p>2\u3064\u76ee\u306e\u65b9\u6cd5\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u8a2d\u5b9a\u30d1\u30cd\u30eb\u3092\u751f\u6210\u3057\u3001\u6295\u7a3f\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6dfb\u4ed8\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u306e\u624b\u9806\u3068\u307b\u307c\u540c\u3058\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u30d6\u30ed\u30c3\u30af\u304c\u5fc5\u8981\u306a\u3044\u70b9\u306f\u7570\u306a\u308a\u307e\u3059\u3002\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u3001\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30bb\u30c3\u30c8\u3092\u542b\u3080\u30d1\u30cd\u30eb\u3092\u751f\u6210\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-2-create-new-block\">create-block\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-2-register-custom-meta-box\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-2-register-custom-fields\">register_post_meta()\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-2-register-plugin\">index.js\u30d5\u30a1\u30a4\u30eb\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-2-build-component\">\u7d44\u307f\u8fbc\u307f\u306eGutenberg\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3059\u308b<\/a><\/li>\n<\/ol>\n<h4 id=\"option-2-create-new-block\">1. create-block\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b<\/h4>\n<p>\u65b0\u3057\u3044\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#create-a-custom-block-to-store-and-display-custom-meta-fields\">\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3<\/a>\u306e\u624b\u9806\u306b\u5f93\u3044\u307e\u3059\u3002\u65b0\u3057\u3044\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u304b\u3001\u524d\u306e\u4f8b\u3067\u69cb\u7bc9\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 id=\"option-2-register-custom-meta-box\">2. \u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p>\u6b21\u306b\u3001\u307e\u3060\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u308bWordPress\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3068\u306e\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u305f\u3081\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u624b\u9806\u306f<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#add-a-meta-box-to-the-classic-editor\">\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3<\/a>\u3067\u8aac\u660e\u3057\u305f\u3082\u306e\u3068\u540c\u3058\u3067\u3059\u3002<\/p>\n<h4 id=\"option-2-register-custom-fields\">3. \u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p>\u6b21\u306e\u624b\u9806\u3067\u306f\u3001<code>register_post_meta()<\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u3067\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u3053\u308c\u3082<a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#register-custom-meta-fields\">\u524d\u306e\u4f8b<\/a>\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 id=\"option-2-register-plugin\">4. index.js\u30d5\u30a1\u30a4\u30eb\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p>\u3053\u3053\u307e\u3067\u306e\u624b\u9806\u3092\u7d42\u3048\u305f\u3089<strong>index.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u3001\u30ab\u30b9\u30bf\u30e0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3059\u308b\u524d\u306b\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e<strong>src<\/strong>\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b<strong>components<\/strong>\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<strong>components<\/strong>\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u3001\u65b0\u3057\u304f<strong>MetaBox.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u540d\u524d\u306f\u81ea\u7531\u306b\u4ed8\u3051\u3066\u304b\u307e\u3044\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001React\u306e<a href=\"https:\/\/github.com\/airbnb\/javascript\/tree\/master\/react#naming\">\u547d\u540d\u306b\u95a2\u3059\u308b\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/a>\u306b\u5f93\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6b21\u306b\u9032\u3080\u524d\u306b\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304b\u3089<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-plugins\/\"><code>@wordpress\/plugins<\/code>\u30e2\u30b8\u30e5\u30fc\u30eb<\/a>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30ed\u30bb\u30b9\u3092\u505c\u6b62\u3057\u3066\uff08mac\u306e\u5834\u5408\uff09\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u518d\u3073\u30d7\u30ed\u30bb\u30b9\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-bash\">^C\nnpm install @wordpress\/plugins --save\nnpm start<\/code><\/pre>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e<strong>index.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-js\">\/**\n * Registers a plugin for adding items to the Gutenberg Toolbar\n *\n * @see https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar\/\n *\/\nimport { registerPlugin } from '@wordpress\/plugins';\n\nimport MetaBox from '.\/components\/MetaBox';<\/code><\/pre>\n<p>\u3053\u308c\u3082\u308f\u304b\u308a\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3067\u3059\u304c\u3001React\u306b\u8a73\u3057\u304f\u306a\u3044\u65b9\u5411\u3051\u306b\u30012\u3064\u306e<code>import<\/code>\u6587\u306b\u3064\u3044\u3066\u5c11\u3057\u89e6\u308c\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u6700\u521d\u306e<code>import<\/code>\u6587\u3067\u306f\u3001\u95a2\u6570\u306e\u540d\u524d\u3092\u4e2d\u62ec\u5f27\u3067\u56f2\u3093\u3067\u3044\u307e\u3059\u30022\u3064\u76ee\u306e<code>import<\/code>\u6587\u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u540d\u524d\u3092\u4e2d\u62ec\u5f27\u3067\u56f2\u3093\u3067\u3044\u307e\u305b\u3093\u3002<\/p>\n<aside role=\"note\" class=\"wp-block-kinsta-notice is-style-info\">\n            <h3>Info<\/h3>\n        <p>\u4e2d\u62ec\u5f27\u306e\u306a\u3044<code>import<\/code>\u6587\u306f\u3001<strong>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/strong>\u3057\u307e\u3059\u3002\u4e2d\u62ec\u5f27\u4ed8\u304d\u306e<code>import<\/code>\u6587\u306f\u3001<strong>\u540d\u524d\u4ed8\u304d\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8<\/strong>\u3057\u307e\u3059\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u5148\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/beta.reactjs.org\/learn\/importing-and-exporting-components\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30a4\u30f3\u30dd\u30fc\u30c8\u3068\u30a8\u30af\u30b9\u30dd\u30fc\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/create-react-app.dev\/docs\/importing-a-component\/\">\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u30a4\u30f3\u30dd\u30fc\u30c8<\/a><\/li>\n<li><a href=\"https:\/\/stackoverflow.com\/questions\/36795819\/when-should-i-use-curly-braces-for-es6-import\/36796281#36796281\">ES6\u306eimport\u3067\u3044\u3064\u4e2d\u62ec\u5f27\u3092\u4f7f\u7528\u3059\u3079\u304d\u304b<\/a><\/li>\n<\/ul>\n<p><\/p>\n<\/aside>\n\n<p>\u6b21\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-js\">registerPlugin( 'metadata-plugin', {\n\trender: MetaBox\n} );<\/code><\/pre>\n<p><code>registerPlugin<\/code>\u306f\u3001\u5358\u7d14\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u3053\u306e\u95a2\u6570\u306f2\u3064\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u53d6\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u8b58\u5225\u3059\u308b\u4e00\u610f\u306e\u6587\u5b57\u5217<\/li>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08\u6ce8\u610f\uff1a<code>render<\/code>\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u5fc5\u9808\u3067\u3001\u6709\u52b9\u306a\u95a2\u6570\u3067\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\uff09<\/li>\n<\/ul>\n<h4 id=\"option-2-build-component\">5. \u7d44\u307f\u8fbc\u307f\u306eGutenberg\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3059\u308b<\/h4>\n<p>\u3053\u308c\u3067React\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<strong>MetaBox.js<\/strong>\u30d5\u30a1\u30a4\u30eb\uff08\u307e\u305f\u306f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u7528\u306e\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306eimport\u6587\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-js\">import { __ } from '@wordpress\/i18n';\nimport { compose } from '@wordpress\/compose';\nimport { withSelect, withDispatch } from '@wordpress\/data';\nimport { PluginDocumentSettingPanel } from '@wordpress\/edit-post';\nimport { PanelRow, TextControl, DateTimePicker } from '@wordpress\/components';<\/code><\/pre>\n<p><code>compose<\/code>\u95a2\u6570\u306f\u95a2\u6570\u5408\u6210\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u95a2\u6570\u5408\u6210\u3067\u306f\u3001\u3042\u308b\u95a2\u6570\u306e\u7d50\u679c\u304c\u5225\u306e\u95a2\u6570\u306b\u6e21\u3055\u308c\u307e\u3059\u3002<code>compose<\/code>\u3092\u4f7f\u7528\u3059\u308b\u524d\u306b\u3001\u5bfe\u5fdc\u3059\u308b\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-bash\">npm install @wordpress\/compose --save<\/code><\/pre>\n<p><code>compose<\/code>\u95a2\u6570\u306e\u5b9f\u969b\u306e\u4f8b\u304c\u3001\u3053\u306e\u5f8c\u3059\u3050\u306b\u767b\u5834\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>withSelect<\/code>\u3068<code>withDispatch<\/code>\u306f2\u3064\u306e\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3067\u3001\u305d\u308c\u305e\u308c\u3001WordPress\u30b9\u30c8\u30a2\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3001WordPress\u30b9\u30c8\u30a2\u306b\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<code>withSelect<\/code>\u306f\u3001\u767b\u9332\u3055\u308c\u305f<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/data\/README.md#selectors\">\u30bb\u30ec\u30af\u30bf<\/a>\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30c6\u30fc\u30c8\u7531\u6765\u306eprops\u3092\u633f\u5165\u3057\u307e\u3059\u3002<code>withDispatch<\/code>\u306f\u3001\u767b\u9332\u3055\u308c\u305f<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/data\/README.md#actions\">Action Creator<\/a>\u3092\u4f7f\u7528\u3057\u3066\u3001props\u3092\u30c7\u30a3\u30b9\u30d1\u30c3\u30c1\u3057\u307e\u3059\u3002<\/li>\n<li><code>PluginDocumentSettingPanel<\/code>\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u9805\u76ee\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u307e\u3059\uff08<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/edit-post\/src\/components\/sidebar\/plugin-document-setting-panel\/index.js#L55\">Github<\/a>\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002<\/li>\n<\/ul>\n<p>\u6b21\u306b\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u30d1\u30cd\u30eb\u3092\u8868\u793a\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<strong>MetaBox.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u306b\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code class=\"language-jsx\">const MetaBox = ( { postType, metaFields, setMetaFields } ) =&gt; {\n\n\tif ( 'post' !== postType ) return null;\n\n\treturn(\n\t\t&lt;PluginDocumentSettingPanel \n\t\t\ttitle={ __( 'Book details' ) } \n\t\t\ticon=\"book\"\n\t\t\tinitialOpen={ false }\n\t\t&gt;\n\t\t\t&lt;PanelRow&gt;\n\t\t\t\t&lt;TextControl \n\t\t\t\t\tvalue={ metaFields._meta_fields_book_title }\n\t\t\t\t\tlabel={ __( \"Title\" ) }\n\t\t\t\t\tonChange={ (value) =&gt; setMetaFields( { _meta_fields_book_title: value } ) }\n\t\t\t\t\/&gt;\n\t\t\t&lt;\/PanelRow&gt;\n\t\t\t&lt;PanelRow&gt;\n\t\t\t\t&lt;TextControl \n\t\t\t\t\tvalue={ metaFields._meta_fields_book_author }\n\t\t\t\t\tlabel={ __( \"Author\" ) }\n\t\t\t\t\tonChange={ (value) =&gt; setMetaFields( { _meta_fields_book_author: value } ) }\n\t\t\t\t\/&gt;\n\t\t\t&lt;\/PanelRow&gt;\n\t\t\t&lt;PanelRow&gt;\n\t\t\t\t&lt;TextControl \n\t\t\t\t\tvalue={ metaFields._meta_fields_book_publisher }\n\t\t\t\t\tlabel={ __( \"Publisher\" ) }\n\t\t\t\t\tonChange={ (value) =&gt; setMetaFields( { _meta_fields_book_publisher: value } ) }\n\t\t\t\t\/&gt;\n\t\t\t&lt;\/PanelRow&gt;\n\t\t\t&lt;PanelRow&gt;\n\t\t\t\t&lt;DateTimePicker\n\t\t\t\t\tcurrentDate={ metaFields._meta_fields_book_date }\n\t\t\t\t\tonChange={ ( newDate ) =&gt; setMetaFields( { _meta_fields_book_date: newDate } ) }\n\t\t\t\t\t__nextRemoveHelpButton\n\t\t\t\t\t__nextRemoveResetButton\n\t\t\t\t\/&gt;\n\t\t\t&lt;\/PanelRow&gt;\n\t\t&lt;\/PluginDocumentSettingPanel&gt;\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) =&gt; {\n\treturn {\n\t\tmetaFields: select( 'core\/editor' ).getEditedPostAttribute( 'meta' ),\n\t\tpostType: select( 'core\/editor' ).getCurrentPostType()\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) =&gt; {\n\treturn {\n\t\tsetMetaFields ( newValue ) {\n\t\t\tdispatch('core\/editor').editPost( { meta: newValue } )\n\t\t}\n\t}\n} );\n\nexport default compose([\n\tapplyWithSelect,\n\tapplyWithDispatch\n])(MetaBox);<\/code><\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3092\u6398\u308a\u4e0b\u3052\u3066\u307f\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-document-setting-panel\/\"><code>PluginDocumentSettingPanel<\/code><\/a><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-document-setting-panel\/\">\u8981\u7d20<\/a>\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u306b<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/edit-post\/src\/components\/sidebar\/plugin-document-setting-panel\/index.js#L55\">\u65b0\u3057\u3044\u30d1\u30cd\u30eb\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0<\/a>\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u30bf\u30a4\u30c8\u30eb\u300cBook details\u300d\uff08\u66f8\u7c4d\u306e\u8a73\u7d30\uff09\u3068\u30a2\u30a4\u30b3\u30f3\u3092\u8a2d\u5b9a\u3057\u3001<code>initialOpen<\/code>\u3092<code>false<\/code>\u306b\u8a2d\u5b9a\u3057\u3066\u3001\u521d\u671f\u72b6\u614b\u3067\u306f\u30d1\u30cd\u30eb\u3092\u9589\u3058\u3066\u3044\u307e\u3059\u3002<\/li>\n<li><code>PluginDocumentSettingPanel<\/code>\u5185\u306b\u306f\u30013\u3064\u306e\u30c6\u30ad\u30b9\u30c8\u30d5\u30a3\u30fc\u30eb\u30c9\u3068\u3001\u51fa\u7248\u65e5\u306e\u8a2d\u5b9a\u7528\u306b<code>DateTimePicker<\/code>\u8981\u7d20\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n<li><code>withSelect<\/code>\u3092\u4ecb\u3057\u305f<code>select<\/code>\u95a2\u6570\u3092\u5229\u7528\u3057\u3066\u3001<code>metaFields<\/code>\u3068<code>postType<\/code>\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<code>withDispatch<\/code>\u3092\u4ecb\u3057\u305f<code>dispatch<\/code>\u95a2\u6570\u3092\u5229\u7528\u3057\u3066\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u5024\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002<\/li>\n<li>\u6700\u5f8c\u306b<code>compose<\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092<code>withSelect<\/code>\u304a\u3088\u3073<code>withDispatch<\/code>\u306e\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u5408\u6210\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f<code>metaFields<\/code>\u3068<code>postType<\/code>\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3068<code>setMetaFields<\/code>\u95a2\u6570\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<p><strong>MetaBox.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u3001WordPress\u958b\u767a\u30b5\u30a4\u30c8\u3067\u65b0\u3057\u3044\u6295\u7a3f\u3092\u4f5c\u6210\u3057\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300c<strong>Book details<\/strong>\u300d\uff08\u66f8\u7c4d\u306e\u8a73\u7d30\uff09\u30d1\u30cd\u30eb\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_142918\" aria-describedby=\"caption-attachment-142918\" style=\"width: 1851px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142918 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/book-details-panel.jpg\" alt=\"Gutenberg\u5185\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u30d1\u30cd\u30eb\" width=\"1851\" height=\"1617\"><figcaption id=\"caption-attachment-142918\" class=\"wp-caption-text\">Gutenberg\u5185\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u30d1\u30cd\u30eb<\/figcaption><\/figure>\n<p>\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u8a2d\u5b9a\u3057\u3066\u6295\u7a3f\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u30da\u30fc\u30b8\u3092\u518d\u8aad\u307f\u8fbc\u307f\u3057\u3066\u3001\u5165\u529b\u3057\u305f\u5024\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u6b21\u306b\u3001\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u69cb\u7bc9\u3057\u305f\u30d6\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3057\u3066\u3001\u3059\u3079\u3066\u304c\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>\u6295\u7a3f\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u8ffd\u52a0<\/h3>\n<p>\u6295\u7a3f\u3084\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u30bf\u30a4\u30d7\u306b\u5927\u91cf\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u306b\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u5c02\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u8a2d\u5b9a\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u624b\u9806\u306f\u4e0a\u3067\u3054\u7d39\u4ecb\u3057\u305f\u4f8b\u3068\u3088\u304f\u4f3c\u3066\u3044\u308b\u305f\u3081\u3001Gutenberg\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u30b5\u30a4\u30c9\u30d0\u30fc\u306f\u7c21\u5358\u306b\u69cb\u7bc9\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-3-create-new-block\">create-block\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-3-register-custom-meta-box\">\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-3-register-custom-fields\">register_post_meta()\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-3-register-plugin\">index.js\u30d5\u30a1\u30a4\u30eb\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3059\u308b<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#option-3-build-component\">\u7d44\u307f\u8fbc\u307f\u306eGutenberg\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3059\u308b<\/a><\/li>\n<\/ol>\n<h4 id=\"#option-3-create-new-block\">1. create-block\u3092\u4f7f\u7528\u3057\u3066\u65b0\u3057\u3044\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b<\/h4>\n<p>\u524d\u306b\u8aac\u660e\u3057\u305f\u624b\u9806\u306b\u5f93\u3044\u3001\u30d6\u30ed\u30c3\u30af\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u65b0\u898f\u306b\u4f5c\u6210\u3059\u308b\u304b\u3001\u5148\u307b\u3069\u69cb\u7bc9\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7de8\u96c6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4 id=\"#option-3-register-custom-meta-box\">2. \u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u7528\u306e\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p>\u30af\u30e9\u30b7\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u308bWordPress\u30b5\u30a4\u30c8\u3068\u306e\u5f8c\u65b9\u4e92\u63db\u6027\u306e\u305f\u3081\u3001\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3092\u767b\u9332\u3057\u307e\u3059\u3002\u624b\u9806\u306f\u524d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3054\u8aac\u660e\u3057\u305f\u901a\u308a\u3002<\/p>\n<h4 id=\"#option-3-register-custom-fields\">3. \u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u306b\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p><code>register_post_meta()<\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u30e1\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u30d5\u30a1\u30a4\u30eb\u3067\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<h4 id=\"#option-3-register-plugin\">4. index.js\u30d5\u30a1\u30a4\u30eb\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u767b\u9332\u3059\u308b<\/h4>\n<p><strong>components<\/strong>\u30d5\u30a9\u30eb\u30c0\u306b\u7a7a\u306e<strong>CustomSidebar.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f5c\u6210\u3057\u305f\u3089\u3001<strong>index.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-js\">\/**\n * Registers a plugin for adding items to the Gutenberg Toolbar\n *\n * @see https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar\/\n *\/\nimport { registerPlugin } from '@wordpress\/plugins';\n\nimport CustomSidebar from '.\/components\/CustomSidebar';\n\/\/ import MetaBox from '.\/components\/MetaBox';\n\nregisterPlugin( 'metadata-block', {\n    render: CustomSidebar\n} );<\/code><\/pre>\n<p>\u4e0a\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u307e\u305a<code>CustomSidebar<\/code>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u304b\u3089\u3001\u65b0\u3057\u3044\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u3088\u3046\u3001<code>registerPlugin<\/code>\u95a2\u6570\u306b\u6307\u793a\u3057\u307e\u3059\u3002<\/p>\n<h4>5. \u7d44\u307f\u8fbc\u307f\u306eGutenberg\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3059\u308b<\/h4>\n<p>\u6b21\u306b\u3001<strong>CustomSidebar.js<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u3001\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-php\">import { __ } from '@wordpress\/i18n';\nimport { compose } from '@wordpress\/compose';\nimport { withSelect, withDispatch } from '@wordpress\/data';\nimport { PluginSidebar, PluginSidebarMoreMenuItem } from '@wordpress\/edit-post';\nimport { PanelBody, PanelRow, TextControl, DateTimePicker } from '@wordpress\/components';<\/code><\/pre>\n<p>\u65b0\u305f\u306b2\u3064\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li><code>PluginSidebar<\/code>\u306f\u3001Gutenberg\u30c4\u30fc\u30eb\u30d0\u30fc\u306b\u30a2\u30a4\u30b3\u30f3\u3092\u8ffd\u52a0\u3057\u3001\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068<code><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar\/\">&lt;PluginSidebar \/&gt;<\/a><\/code><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar\/\">\u8981\u7d20<\/a>\u3067\u30e9\u30c3\u30d7\u3055\u308c\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u542b\u3080\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\uff08\u3053\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/569241a3e1b7d0cc0567fccb92b1b57eb1b5b9c5\/packages\/edit-site\/src\/components\/sidebar-edit-mode\/plugin-sidebar\/index.js\">GitHub<\/a>\u306b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u3042\u308a\u307e\u3059\uff09\u3002<\/li>\n<li><code>PluginSidebarMoreMenuItem<\/code>\u306f\u3001\u300c\u30aa\u30d7\u30b7\u30e7\u30f3\u300d\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u306e\u300c\u30d7\u30e9\u30b0\u30a4\u30f3\u300d\u306e\u4e0b\u306b<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar-more-menu-item\/\">\u30e1\u30cb\u30e5\u30fc\u9805\u76ee\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0<\/a>\u3057\u3001\u5bfe\u5fdc\u3059\u308b<code>PluginSidebar<\/code>\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u6709\u52b9\u5316\u3057\u307e\u3059\uff08<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/a7e2895829c16ecd77a5ba22d84f1dee1cfb0977\/packages\/edit-post\/src\/components\/header\/plugin-sidebar-more-menu-item\/index.js\">GitHub<\/a>\u3082\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002<\/li>\n<\/ul>\n<p>\u3053\u308c\u3067\u30ab\u30b9\u30bf\u30e0\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-jsx\">const CustomSidebar = ( { postType, metaFields, setMetaFields } ) =&gt; {\n        \n    if ( 'post' !== postType ) return null;\n\n    return (\n        &lt;&gt;\n            &lt;PluginSidebarMoreMenuItem \n                target=\"metadata-sidebar\" \n                icon=\"book\"\n            &gt;\n                Metadata Sidebar\n            &lt;\/PluginSidebarMoreMenuItem&gt;\n            &lt;PluginSidebar \n                name=\"metadata-sidebar\" \n                icon=\"book\" \n                title=\"My Sidebar\"\n            &gt;\n                &lt;PanelBody title=\"Book details\" initialOpen={ true }&gt;\n                    &lt;PanelRow&gt;\n                        &lt;TextControl \n                            value={ metaFields._meta_fields_book_title }\n                            label={ __( \"Title\" ) }\n                            onChange={ (value) =&gt; setMetaFields( { _meta_fields_book_title: value } ) }\n                        \/&gt;\n                    &lt;\/PanelRow&gt;\n                    &lt;PanelRow&gt;\n                        &lt;TextControl \n                            value={ metaFields._meta_fields_book_author }\n                            label={ __(\"Author\", \"textdomain\") }\n                            onChange={ (value) =&gt; setMetaFields( { _meta_fields_book_author: value } ) }\n                        \/&gt;\n                    &lt;\/PanelRow&gt;\n                    &lt;PanelRow&gt;\n                        &lt;TextControl \n                            value={ metaFields._meta_fields_book_publisher }\n                            label={ __(\"Publisher\", \"textdomain\") }\n                            onChange={ (value) =&gt; setMetaFields( { _meta_fields_book_publisher: value } ) }\n                        \/&gt;\n                    &lt;\/PanelRow&gt;\n                    &lt;PanelRow&gt;\n                        &lt;DateTimePicker\n                            currentDate={ metaFields._meta_fields_book_date }\n                            onChange={ ( newDate ) =&gt; setMetaFields( { _meta_fields_book_date: newDate } ) }\n                            __nextRemoveHelpButton\n                            __nextRemoveResetButton\n                        \/&gt;\n                    &lt;\/PanelRow&gt;\n                &lt;\/PanelBody&gt;\n            &lt;\/PluginSidebar&gt;\n        &lt;\/&gt;\n    )\n}<\/code><\/pre>\n<p>\u6700\u5f8c\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<code>withSelect<\/code>\u3084<code>withDispatch<\/code>\u3068\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u5408\u6210\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-js\">const applyWithSelect = withSelect( ( select ) =&gt; {\n    return {\n        metaFields: select( 'core\/editor' ).getEditedPostAttribute( 'meta' ),\n        postType: select( 'core\/editor' ).getCurrentPostType()\n    };\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) =&gt; {\n    return {\n        setMetaFields ( newValue ) {\n            dispatch('core\/editor').editPost( { meta: newValue } )\n        }\n    }\n} );\n\nexport default compose([\n    applyWithSelect,\n    applyWithDispatch\n])(CustomSidebar);<\/code><\/pre>\n<p>\u5909\u66f4\u3092\u4fdd\u5b58\u3057\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u300c\u30aa\u30d7\u30b7\u30e7\u30f3\u300d\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u3092\u958b\u304f\u3068\u3001\u300c\u30d7\u30e9\u30b0\u30a4\u30f3\u300d\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u4e0b\u306b\u65b0\u3057\u3044\u9805\u76ee\u300cMetadata Sidebar\u300d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u306e\u9805\u76ee\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u65b0\u3057\u3044\u30ab\u30b9\u30bf\u30e0\u30b5\u30a4\u30c9\u30d0\u30fc\u304c\u6709\u52b9\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n<figure id=\"attachment_143176\" aria-describedby=\"caption-attachment-143176\" style=\"width: 1858px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-143176 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/plugin-sidebar-more-menu-item.jpg\" alt=\"PluginSidebarMoreMenuItem\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3088\u3063\u3066\u300c\u30d7\u30e9\u30b0\u30a4\u30f3\u300d\u30bb\u30af\u30b7\u30e7\u30f3\" width=\"1858\" height=\"1096\"><figcaption id=\"caption-attachment-143176\" class=\"wp-caption-text\">PluginSidebarMoreMenuItem\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306b\u3088\u3063\u3066\u300c\u30d7\u30e9\u30b0\u30a4\u30f3\u300d\u30bb\u30af\u30b7\u30e7\u30f3<\/figcaption><\/figure>\n<p>\u306e\u4e0b\u306b\u30e1\u30cb\u30e5\u30fc\u9805\u76ee\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3059<\/p>\n<figure id=\"attachment_143175\" aria-describedby=\"caption-attachment-143175\" style=\"width: 1860px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-143175 size-full\" src=\"https:\/\/kinsta.com\/wp-content\/uploads\/2022\/12\/custom-sidebar-open.jpg\" alt=\"\u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u30b5\u30a4\u30c9\u30d0\u30fc\" width=\"1860\" height=\"1198\"><figcaption id=\"caption-attachment-143175\" class=\"wp-caption-text\">\u30d7\u30e9\u30b0\u30a4\u30f3\u8a2d\u5b9a\u30b5\u30a4\u30c9\u30d0\u30fc<\/figcaption><\/figure>\n<p>\u6b21\u306b\u958b\u767a\u30b5\u30a4\u30c8\u306b\u623b\u308a\u3001\u6295\u7a3f\u3092\u65b0\u898f\u4f5c\u6210\u3057\u307e\u3059\u3002\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u5165\u529b\u3057\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u306e\u30ad\u30e3\u30f3\u30d0\u30b9\u306b\u30d6\u30ed\u30c3\u30af\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30ab\u30b9\u30bf\u30e0\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u5165\u529b\u3057\u305f\u30e1\u30bf\u5024\u3068\u540c\u3058\u5024\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u6295\u7a3f\u3092\u4fdd\u5b58\u3057\u3066\u3001\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u3067\u30da\u30fc\u30b8\u3092\u30d7\u30ec\u30d3\u30e5\u30fc\u3057\u307e\u3059\u3002\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u3001\u8457\u8005\u3001\u51fa\u7248\u793e\u3001\u51fa\u7248\u65e5\u3092\u542b\u3080\u30ab\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u53d6\u308a\u4e0a\u3052\u305f\u3059\u3079\u3066\u306e\u30b3\u30fc\u30c9\u306f\u3001<a href=\"https:\/\/gist.github.com\/carlodaniele\/05d4e8b6d982a4ef30840015fbdfb35f\">\u516c\u958bgist<\/a>\u3067\u53c2\u7167\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n<h2>\u3055\u3089\u306a\u308b\u5b66\u7fd2<\/h2>\n<p>\u4eca\u56de\u306f\u3001\u30bb\u30ec\u30af\u30bf\u304b\u3089\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u307e\u3067\u3001\u69d8\u3005\u306a\u30c8\u30d4\u30c3\u30af\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3057\u305f\u3002\u8a18\u4e8b\u4e2d\u306b\u306f\u53c2\u8003\u306b\u3057\u305f\u4e3b\u8981\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30ea\u30f3\u30af\u3082\u63b2\u8f09\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5404\u30c8\u30d4\u30c3\u30af\u3092\u3055\u3089\u306b\u6df1\u304f\u6398\u308a\u4e0b\u3052\u305f\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30ea\u30bd\u30fc\u30b9\u3082\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>Gutenberg\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068WordPress\u516c\u5f0f\u30ea\u30bd\u30fc\u30b9<\/h3>\n<ul>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u30cf\u30f3\u30c9\u30d6\u30c3\u30af \u2500<a href=\"https:\/\/developer.wordpress.org\/plugins\/metadata\/custom-meta-boxes\/\">Custom Meta Boxes<\/a><\/li>\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u30cf\u30f3\u30c9\u30d6\u30c3\u30af\u2500<a href=\"https:\/\/developer.wordpress.org\/plugins\/metadata\/managing-post-metadata\/\">Managing Post Metadata<\/a><\/li>\n<li>\u958b\u767a\u30ac\u30a4\u30c9\u2500<a href=\"https:\/\/ja.wordpress.org\/team\/handbook\/block-editor\/how-to-guides\/metabox\/\">\u30e1\u30bf\u30dc\u30c3\u30af\u30b9<\/a><\/li>\n<li>\u958b\u767a\u30ac\u30a4\u30c9\u2500<a href=\"https:\/\/ja.wordpress.org\/team\/handbook\/block-editor\/how-to-guides\/plugin-sidebar-0\/\">\u30d7\u30e9\u30b0\u30a4\u30f3\u7528\u30b5\u30a4\u30c9\u30d0\u30fc<\/a><\/li>\n<li>\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u30cf\u30f3\u30c9\u30d6\u30c3\u30af\u2500<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/slotfills\/plugin-sidebar\/\">PluginSidebar<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u2500<a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-compose\/\">@wordpress\/compose<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u2500data \/ <a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/data\/README.md#comparison-with-redux\">Comparison with Redux<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u2500data \/ <a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/data\/README.md#withdispatch\">withDispatch<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u2500data \/ <a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-data\/#dispatch\">dispatch<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u2500data \/ <a href=\"https:\/\/github.com\/WordPress\/gutenberg\/blob\/trunk\/packages\/data\/README.md#withselect\">withSelect<\/a><\/li>\n<li>\u30d1\u30c3\u30b1\u30fc\u30b8\u2500data \/ <a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/packages\/packages-data\/#select\">select<\/a><\/li>\n<\/ul>\n<h3>\u305d\u306e\u4ed6\u306e\u516c\u5f0f\u30ea\u30bd\u30fc\u30b9<\/h3>\n<ul>\n<li><a href=\"https:\/\/reactjs.org\/docs\/higher-order-components.html\">\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8<\/a>\uff08React\uff09<\/li>\n<li><a href=\"https:\/\/redux.js.org\/tutorials\/fundamentals\/part-7-standard-patterns#action-creators\">Action Creators<\/a>\uff08Redux\uff09<\/li>\n<li><a href=\"https:\/\/redux.js.org\/usage\/deriving-data-selectors\">Deriving Data with Selectors\uff08\u30bb\u30ec\u30af\u30bf\u3092\u4f7f\u7528\u3057\u305f\u30c7\u30fc\u30bf\u306e\u5c0e\u51fa\uff09<\/a>\uff08Redux\uff09<\/li>\n<\/ul>\n<h3>\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u3088\u308b\u30ea\u30bd\u30fc\u30b9<\/h3>\n<ul>\n<li><a href=\"https:\/\/unfoldingneurons.com\/2019\/fantastic-hooks-and-where-to-use-them\">Fantastic hooks and where to use them by Darren Ethier<\/a>\uff08\u7d20\u6674\u3089\u3057\u3044\u30d5\u30c3\u30af\u3068\u4f7f\u7528\u65b9\u6cd5\uff09<\/li>\n<li><a href=\"https:\/\/unfoldingneurons.com\/2020\/wordpress-data-series-overview-and-introduction\">WordPress Data Series Overview and Introduction by Darren Ethier<\/a>\uff08WordPress\u30c7\u30fc\u30bf\u30b7\u30ea\u30fc\u30ba\u6982\u8981\u3068\u5165\u9580\uff09<\/li>\n<li><a href=\"https:\/\/github.com\/airbnb\/javascript\/tree\/master\/react\">Airbnb React\/JSX Style Guide<\/a>\uff08Airbnb Reac\/JSX\u30b9\u30bf\u30a4\u30eb\u30ac\u30a4\u30c9\uff09<\/li>\n<li><a href=\"https:\/\/www.robinwieruch.de\/react-higher-order-components\/\">React Higher-Order Components (HOCs) by Robin Wieruch<\/a>\uff08React\u9ad8\u968e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\uff09<\/li>\n<li><a href=\"https:\/\/www.educative.io\/answers\/function-composition-in-javascript\">Function composition in JavaScript<\/a>\uff08JavaScript\u306e\u95a2\u6570\u5408\u6210\uff09<\/li>\n<li><a href=\"https:\/\/ryanwelcher.com\/2021\/08\/requesting-data-in-gutenberg-with-getentityrecords\/\">Requesting data in Gutenberg with getEntityRecords by Ryan Welcher<\/a>\uff08Gutenberg\u3067\u306egetEntityRecords\u306b\u3088\u308b\u30c7\u30fc\u30bf\u306e\u30ea\u30af\u30a8\u30b9\u30c8\uff09<\/li>\n<\/ul>\n<h3>Kinsta\u306e\u95a2\u9023\u8a18\u4e8b<\/h3>\n<ul>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-react-js\/\">js\u3068\u306f\uff1f\u4eba\u6c17\u306eJavaScript\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u7406\u89e3\u3057\u3088\u3046<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/react-best-practices\/\">\u30102023\u5e74\u7248\u3011React\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3067\u30b9\u30ad\u30eb\u3092\u78e8\u304f<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/react-components-library\/\">\u30102023\u5e74\u7248\u3011React\u306eUI\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea23\u9078<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-workflow\/\">WordPress\u958b\u767a\u8005\u306b\u304a\u3059\u3059\u3081\u306e\u52b9\u7387\u7684\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\uff08\u30b3\u30c4\u3068\u5177\u4f53\u4f8b\uff09<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/blog\/wordpress-developer-salary\/\">WordPress\u958b\u767a\u8005\u306e\u7d66\u4e0e\uff1a\u5e73\u5747\u7d66\u4e0e\u3068\u7d66\u4e0e\u30a2\u30c3\u30d7\u306e\u79d8\u8a23<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/what-is-javascript\/\">JavaScript\u3068\u306f\uff1f\u4e16\u754c\u3067\u6700\u3082\u666e\u53ca\u3057\u3066\u3044\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3092\u7406\u89e3\u3057\u3088\u3046<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/errors-in-javascript\/\">JavaScript\u306e\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u306e\u89e3\u6c7a\u65b9\u6cd5\uff08\u6c7a\u5b9a\u7248\uff09<\/a><\/li>\n<li><a href=\"https:\/\/kinsta.com\/jp\/blog\/javascript-libraries\/\">\u30102023\u5e74\u7248\u3011JavaScript\u306e\u304a\u3059\u3059\u3081\u30e9\u30a4\u30d6\u30e9\u30ea\uff06\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af40\u9078<\/a><\/li>\n<\/ul>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Gutenberg\u30d6\u30ed\u30c3\u30af\u958b\u767a\u306b\u307e\u3064\u308f\u308b\u8a18\u4e8b\u306f\u3053\u308c\u304c\u7b2c\u4e09\u5f3e\u3002\u4eca\u56de\u306f\u3001\u4e0a\u7d1a\u8005\u5411\u3051\u306e\u30c6\u30fc\u30de\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3057\u305f\u3002\u3053\u308c\u307e\u3067\u306b\u3054\u7d39\u4ecb\u3057\u305f<a href=\"https:\/\/kinsta.com\/jp\/blog\/gutenberg-blocks\/\">\u9759\u7684\u30d6\u30ed\u30c3\u30af<\/a>\u3001\u305d\u3057\u3066<a href=\"https:\/\/kinsta.com\/blog\/dynamic-blocks\/\">\u52d5\u7684\u30d6\u30ed\u30c3\u30af\u958b\u767a<\/a><a href=\"https:\/\/kinsta.com\/blog\/dynamic-blocks\/\">\u304c<\/a>\u3088\u308a\u8c4a\u304b\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>Gutenberg\u306b\u304a\u3051\u308b\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u53ef\u80fd\u6027\u3092\u6d3b\u304b\u3057\u3066\u3001\u9ad8\u5ea6\u3067\u6a5f\u80fd\u7684\u306aWordPress\u30b5\u30a4\u30c8\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30d6\u30ed\u30c3\u30af\u958b\u767a\u306b\u95a2\u3059\u308b\u4e00\u9023\u306e\u8a18\u4e8b\u3067\u7fd2\u5f97\u3057\u305f\u30b9\u30ad\u30eb\u306b\u3088\u3063\u3066\u3001WordPress\u4ee5\u5916\u3067\u306eReact\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u958b\u767a\u65b9\u6cd5\u3082\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u7d50\u5c40\u306e\u3068\u3053\u308d\u3001Gutenberg\u3082React\u30d9\u30fc\u30b9\u306eSPA\u958b\u767a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30ab\u30b9\u30bf\u30e0\u30e1\u30bf\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u3063\u305fGutenberg\u30d6\u30ed\u30c3\u30af\u3092\u4f5c\u6210\u3057\u305f\u3089\u3001\u305c\u3072\u4ee5\u4e0b\u306e\u30b3\u30e1\u30f3\u30c8\u6b04\u3067\u5171\u6709\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u30b3\u30f3\u30c6 &#8230;<\/p>\n","protected":false},"author":36,"featured_media":41370,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kinsta_gated_content":false,"_kinsta_gated_content_redirect":"","footnotes":""},"tags":[],"topic":[837],"class_list":["post-41369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","topic-wordpress-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.6 (Yoast SEO v24.6) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5<\/title>\n<meta name=\"description\" content=\"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\" \/>\n<meta property=\"og:site_name\" content=\"Kinsta\u00ae\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-25T11:12:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-28T23:21:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"1460\" \/>\n\t<meta property=\"og:image:height\" content=\"730\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Carlo Daniele\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:description\" content=\"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\" \/>\n<meta name=\"twitter:creator\" content=\"@carlodaniele\" \/>\n<meta name=\"twitter:site\" content=\"@Kinsta_JP\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Carlo Daniele\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"10\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\"},\"author\":{\"name\":\"Carlo Daniele\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63\"},\"headline\":\"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\",\"datePublished\":\"2023-01-25T11:12:00+00:00\",\"dateModified\":\"2023-08-28T23:21:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\"},\"wordCount\":476,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\",\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\",\"url\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\",\"name\":\"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\",\"isPartOf\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\",\"datePublished\":\"2023-01-25T11:12:00+00:00\",\"dateModified\":\"2023-08-28T23:21:59+00:00\",\"description\":\"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage\",\"url\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\",\"contentUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg\",\"width\":1460,\"height\":730},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/kinsta.com\/jp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress\u306e\u30b3\u30c4\",\"item\":\"https:\/\/kinsta.com\/jp\/topics\/wordpress-tips\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kinsta.com\/jp\/#website\",\"url\":\"https:\/\/kinsta.com\/jp\/\",\"name\":\"Kinsta\u00ae\",\"description\":\"\u9ad8\u901f\u304b\u3064\u5805\u7262\u306a\u30d7\u30ec\u30df\u30a2\u30e0\u30b5\u30fc\u30d0\u30fc\u30b5\u30fc\u30d3\u30b9\",\"publisher\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kinsta.com\/jp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kinsta.com\/jp\/#organization\",\"name\":\"Kinsta\",\"url\":\"https:\/\/kinsta.com\/jp\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg\",\"contentUrl\":\"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg\",\"width\":500,\"height\":500,\"caption\":\"Kinsta\"},\"image\":{\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/\",\"https:\/\/x.com\/Kinsta_JP\",\"https:\/\/www.instagram.com\/kinstahosting\/\",\"https:\/\/www.linkedin.com\/company\/kinsta\/\",\"https:\/\/www.pinterest.com\/kinstahosting\/\",\"https:\/\/www.youtube.com\/c\/Kinsta\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63\",\"name\":\"Carlo Daniele\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/kinsta.com\/jp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g\",\"caption\":\"Carlo Daniele\"},\"description\":\"Carlo is a passionate lover of webdesign and front-end development. He has been playing with WordPress for more than 20 years, also in collaboration with Italian and European universities and educational institutions. He has written hundreds of articles and guides about WordPress, published both on Italian and international websites, as well as on printed magazines. You can find him on LinkedIn.\",\"sameAs\":[\"https:\/\/frammentidicodice.com\/\",\"https:\/\/x.com\/carlodaniele\"],\"url\":\"https:\/\/kinsta.com\/jp\/blog\/author\/carlodaniele\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5","description":"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/","og_locale":"ja_JP","og_type":"article","og_title":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5","og_description":"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002","og_url":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/","og_site_name":"Kinsta\u00ae","article_publisher":"https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/","article_published_time":"2023-01-25T11:12:00+00:00","article_modified_time":"2023-08-28T23:21:59+00:00","og_image":[{"width":1460,"height":730,"url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","type":"image\/jpeg"}],"author":"Carlo Daniele","twitter_card":"summary_large_image","twitter_description":"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002","twitter_image":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","twitter_creator":"@carlodaniele","twitter_site":"@Kinsta_JP","twitter_misc":{"\u57f7\u7b46\u8005":"Carlo Daniele","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"10\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#article","isPartOf":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/"},"author":{"name":"Carlo Daniele","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63"},"headline":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5","datePublished":"2023-01-25T11:12:00+00:00","dateModified":"2023-08-28T23:21:59+00:00","mainEntityOfPage":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/"},"wordCount":476,"commentCount":0,"publisher":{"@id":"https:\/\/kinsta.com\/jp\/#organization"},"image":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/","url":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/","name":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5","isPartOf":{"@id":"https:\/\/kinsta.com\/jp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage"},"image":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage"},"thumbnailUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","datePublished":"2023-01-25T11:12:00+00:00","dateModified":"2023-08-28T23:21:59+00:00","description":"Gutenberg\u3067\u306f\u3001WordPress\u306e\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f7f\u7528\u65b9\u6cd5\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30ed\u30c3\u30af\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#primaryimage","url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","contentUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/01\/how-to-add-custom-fields-and-meta-boxes-to-posts-in-gutenberg-01.jpeg","width":1460,"height":730},{"@type":"BreadcrumbList","@id":"https:\/\/kinsta.com\/jp\/blog\/wordpress-add-meta-box-to-post\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kinsta.com\/jp\/"},{"@type":"ListItem","position":2,"name":"WordPress\u306e\u30b3\u30c4","item":"https:\/\/kinsta.com\/jp\/topics\/wordpress-tips\/"},{"@type":"ListItem","position":3,"name":"Gutenberg\u3067\u30e1\u30bf\u30dc\u30c3\u30af\u30b9\u3068\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/kinsta.com\/jp\/#website","url":"https:\/\/kinsta.com\/jp\/","name":"Kinsta\u00ae","description":"\u9ad8\u901f\u304b\u3064\u5805\u7262\u306a\u30d7\u30ec\u30df\u30a2\u30e0\u30b5\u30fc\u30d0\u30fc\u30b5\u30fc\u30d3\u30b9","publisher":{"@id":"https:\/\/kinsta.com\/jp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kinsta.com\/jp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/kinsta.com\/jp\/#organization","name":"Kinsta","url":"https:\/\/kinsta.com\/jp\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/","url":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg","contentUrl":"https:\/\/kinsta.com\/jp\/wp-content\/uploads\/sites\/6\/2023\/12\/kinsta-logo.jpeg","width":500,"height":500,"caption":"Kinsta"},"image":{"@id":"https:\/\/kinsta.com\/jp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Kinsta-Japan-334616080691171\/","https:\/\/x.com\/Kinsta_JP","https:\/\/www.instagram.com\/kinstahosting\/","https:\/\/www.linkedin.com\/company\/kinsta\/","https:\/\/www.pinterest.com\/kinstahosting\/","https:\/\/www.youtube.com\/c\/Kinsta"]},{"@type":"Person","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/962dde02ea6f5df089b5d8d0853bbc63","name":"Carlo Daniele","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/kinsta.com\/jp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429e5568f88110fd9a409b84cb22197e?s=96&d=mm&r=g","caption":"Carlo Daniele"},"description":"Carlo is a passionate lover of webdesign and front-end development. He has been playing with WordPress for more than 20 years, also in collaboration with Italian and European universities and educational institutions. He has written hundreds of articles and guides about WordPress, published both on Italian and international websites, as well as on printed magazines. You can find him on LinkedIn.","sameAs":["https:\/\/frammentidicodice.com\/","https:\/\/x.com\/carlodaniele"],"url":"https:\/\/kinsta.com\/jp\/blog\/author\/carlodaniele\/"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/41369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/users\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/comments?post=41369"}],"version-history":[{"count":7,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/41369\/revisions"}],"predecessor-version":[{"id":48300,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/posts\/41369\/revisions\/48300"}],"alternate":[{"embeddable":true,"hreflang":"en","title":"English","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/en"},{"embeddable":true,"hreflang":"it","title":"Italian","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/it"},{"embeddable":true,"hreflang":"pt","title":"Portuguese","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/pt"},{"embeddable":true,"hreflang":"ja","title":"Japanese","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/jp"},{"embeddable":true,"hreflang":"de","title":"German","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/de"},{"embeddable":true,"hreflang":"da","title":"Danish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/dk"},{"embeddable":true,"hreflang":"nl","title":"Dutch","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/nl"},{"embeddable":true,"hreflang":"sv","title":"Swedish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/se"},{"embeddable":true,"hreflang":"es","title":"Spanish","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/es"},{"embeddable":true,"hreflang":"fr","title":"French","href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/translations\/fr"},{"href":"https:\/\/kinsta.com\/jp\/wp-json\/kinsta\/v1\/posts\/41369\/tree"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/media\/41370"}],"wp:attachment":[{"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/media?parent=41369"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/tags?post=41369"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/kinsta.com\/jp\/wp-json\/wp\/v2\/topic?post=41369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}