{"id":5289,"date":"2019-12-11T17:59:50","date_gmt":"2019-12-11T08:59:50","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=5289"},"modified":"2019-12-11T17:59:50","modified_gmt":"2019-12-11T08:59:50","slug":"%e3%80%90vue%e3%80%91wordpress%e3%81%aerest-api%e3%81%8b%e3%82%89%e3%83%87%e3%83%bc%e3%82%bf%e3%82%92%e5%8f%96%e5%be%97%e3%81%97%e3%81%a6%e4%b8%80%e8%a6%a7%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=5289","title":{"rendered":"\u3010Vue\u3011wordpress\u306eRest API\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u4e00\u89a7\u8868\u793a\u3059\u308b"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u3005\u56de\u306e\u8a18\u4e8b\u300c<a href=\"https:\/\/blog.capilano-fw.com\/?p=5260\">\u30b3\u30d4\u30da\u3067OK\uff01Laravel\u304b\u3089wordpress\u306b\u6295\u7a3f\u3059\u308b\u6a5f\u80fd<\/a>\u300d\u3067\u306f\u3001<code>Laravel<\/code>\u3068<code>wordpress<\/code>\u306e\u9023\u643a\u3059\u308b\u5185\u5bb9\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001<code>wordpress<\/code>\u306f\u3053\u308c\u3060\u3051\u30e1\u30b8\u30e3\u30fc\u306b\u306a\u3063\u305f\u306e\u3067<code>Laravel<\/code>\u4ee5\u5916\u306e\u30c6\u30af\u30ce\u30ed\u30b8\u30fc\u3078\u306e\u9023\u643a\u3082\u9700\u8981\u304c\u3042\u308b\u306e\u304b\u306a\u3001\u3068\u601d\u3063\u305f\u306e\u3067\u4eca\u56de\u306f\u3053\u306e\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u3088\u3046\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u308c\u306f\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">\u5916\u90e8\u30b5\u30a4\u30c8\u304b\u3089wordpress\u306e\u8a18\u4e8b\u3092\u53d6\u5f97\u3057\u3066\u4e00\u89a7\u8868\u793a\u3059\u308b\u6a5f\u80fd<\/strong><\/p>\n<p>\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u307e\u305a\u30e1\u30a4\u30f3\u306e\u30b5\u30a4\u30c8\u304c\u3042\u308b<\/li>\n<li>\u30d6\u30ed\u30b0\u3092wordpress\u3067\u3064\u304f\u3063\u3066\u30b5\u30d6\u30c9\u30e1\u30a4\u30f3\u3067\u904b\u7528<\/li>\n<li>\u30e1\u30a4\u30f3\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u306f\u305d\u306e\u30d6\u30ed\u30b0\u3067\u66f8\u3044\u305f\u8a18\u4e8b\u3078\u306e\u30ea\u30f3\u30af\u304c\u8868\u793a\u3057\u305f\u3044<\/li>\n<\/ul>\n<p>\u3053\u308c\u306f\u30e1\u30a4\u30f3\u306e\u30b5\u30a4\u30c8\u304b\u3089\u3082\u3001\u30d6\u30ed\u30b0\u304b\u3089\u3082\u30a2\u30af\u30bb\u30b9\u3092\u96c6\u3081\u308b\u4f5c\u6226\u3067\u3059\u304c\u3001\u3053\u308c\u306f\u5b9f\u969b\u306b\u904e\u53bb\u306b\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u69d8\u306e\u305f\u3081\u306b\u958b\u767a\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u5185\u5bb9\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\uff01<\/p>\n<p>\u4eca\u56de\u306f<code>Vue<\/code>\u3092\u4f7f\u3063\u3066<code>wordpress<\/code>\u304b\u3089\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u3092\u30ab\u30c6\u30b4\u30ea\u3067\u306e\u7d5e\u308a\u8fbc\u307f\u3084\u8a18\u4e8b\u3078\u306e\u30ea\u30f3\u30af\u3092\u3064\u3051\u3066\u4e00\u89a7\u8868\u793a\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305c\u3072\u7686\u3055\u3093\u306e\u304a\u5f79\u306b\u7acb\u3066\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<br \/>\n\uff08\u6700\u5f8c\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2173 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png\" alt=\"\" width=\"300\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24.png 300w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/11\/no_24-281x300.png 281w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p><strong>\u958b\u767a\u74b0\u5883\uff1a<\/strong> Vue 2.6<\/p>\n<h1>wordpress\u306eRest API\u306eURL\u306e\u898b\u3064\u3051\u65b9<\/h1>\n<p>\u4e8b\u524d\u77e5\u8b58\u3068\u3057\u3066\u3001<code>wordpress<\/code>\u306e\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u306f<code>Rest API<\/code>\u306e<code>URL<\/code>\u304c\u57fa\u672c\u306e\u3082\u306e\u3068\u9055\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u307e\u305a\u6700\u521d\u306b\u3053\u306e<code>URL<\/code>\u306e\u898b\u3064\u3051\u65b9\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002\uff08\u30d6\u30e9\u30a6\u30b6\u306f<code>Google Chrome<\/code>\u3067\u3059\uff09<\/p>\n<p>\u307e\u305a<code>wordpress<\/code>\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u53f3\u30af\u30ea\u30c3\u30af\u3057<strong>\u300c\u30da\u30fc\u30b8\u306e\u30bd\u30fc\u30b9\u3092\u8868\u793a\u300d<\/strong>\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3059\u308b\u3068\u3001HTML\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>rel='https:\/\/api.w.org\/'<\/code>\u304c\u5b58\u5728\u3059\u308b<code>&lt;link&gt;<\/code>\u30bf\u30b0\u3092\u63a2\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08<code>Ctrl + F<\/code>\u3092\u62bc\u3059\u3068\u30da\u30fc\u30b8\u5185\u691c\u7d22\u3067\u304d\u3066\u4fbf\u5229\u3067\u3059\uff09<\/p>\n<pre><strong>&lt;link rel='https:\/\/api.w.org\/' href='\uff08\u3053\u3053\u304cRest API\u306e\u30c8\u30c3\u30d7URL\uff09' \/&gt;<\/strong><\/pre>\n<p>\u203b \u4ee5\u964d\u3001\u3053\u306eURL\u306e\u3053\u3068\u306f<strong>\u300cRest API\u306e\u30c8\u30c3\u30d7URL\u300d<\/strong>\u3068\u547c\u3076\u3053\u3068\u306b\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u30c6\u30b9\u30c8\u3067\u4f5c\u3063\u305f<code>wordpress<\/code>\u3067\u306f\u3001\u6b21\u306e\u3088\u3046\u306aURL\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5295\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_2.png\" alt=\"\" width=\"443\" height=\"22\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_2.png 443w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_2-300x15.png 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u3053\u306e\u30d6\u30ed\u30b0\u3060\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5294\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_3.png\" alt=\"\" width=\"615\" height=\"23\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_3.png 615w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_3-300x11.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/p>\n<p>\u306a\u304a\u3001\u3053\u306e\u4f8b\u3067\u306fURL\u306b<code>?<\/code>\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u5f8c\u3067\u51fa\u3066\u304f\u308b\u8ffd\u52a0\u30d1\u30e9\u30e1\u30fc\u30bf\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f<code>?<\/code>\u3067\u306f\u306a\u304f<code>&amp;<\/code>\u306b\u5909\u66f4\u3057\u305f\u3082\u306e\u3092URL\u3068\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>Vue\u5074\u306e\u4f5c\u696d<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089\u304c<code>Vue<\/code>\u306e\u4f5c\u696d\u306b\u306a\u308a\u307e\u3059\u304c\u4eca\u56de\u306f\u30b3\u30fc\u30c9\u91cf\u306f\u5c11\u306a\u3044\u306e\u3067\u3088\u308a\u8a73\u3057\u304f\u9806\u3092\u8ffd\u3063\u3066\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2>Vue\u306e\u57fa\u672c\u5f62\u3092\u3064\u304f\u308b<\/h2>\n<p>\u307e\u305a\u306f<code>Vue<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u57fa\u672c\u5f62\u3092\u3064\u304f\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    <strong>&lt;link href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.4.1\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div <strong>id=\"app\"<\/strong>&gt;\r\n\r\n    \/\/ \u3053\u3053\u306b\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u3064\u304f\u308b\r\n\r\n&lt;\/div&gt;\r\n<strong>&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/vue@2.6.0\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/axios\/0.19.0\/axios.min.js\"&gt;&lt;\/script&gt;<\/strong>\r\n&lt;script&gt;\r\n\r\n    <strong>new Vue({<\/strong>\r\n<strong>        el: '#app'<\/strong>\r\n<strong>    });<\/strong>\r\n\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u3001\u307e\u305a\u4ee5\u4e0b\uff13\u3064\u306e<code>CDN<\/code>\u306e\u8aad\u307f\u8fbc\u307f\u3067\u3059\u3002<\/p>\n<ul>\n<li>bootstrap\u3000\u30fb\u30fb\u30fb\u3000CSS\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/li>\n<li>vue.js\u3000\u30fb\u30fb\u30fb\u3000JavaScript\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/li>\n<li>axios\u3000\u30fb\u30fb\u30fb\u3000Ajax\u901a\u4fe1\u306e\u30d1\u30c3\u30b1\u30fc\u30b8<\/li>\n<\/ul>\n<p>\u305d\u3057\u3066\u3001HTML\u5185\u306b<code>Vue<\/code>\u304c\u6709\u52b9\u306b\u306a\u308b\u7bc4\u56f2\u306bid\u3092\u3064\u3051\u3066\u3001<\/p>\n<pre>&lt;div <strong>id=\"app\"<\/strong>&gt;\r\n..\r\n&lt;\/div&gt;<\/pre>\n<p>\u305d\u306eID\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b<code>el<\/code>\u306b\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre>new Vue({\r\n    <strong>el: '#app'<\/strong>\r\n});<\/pre>\n<p>\u3053\u308c\u3067<code>&lt;div id=\"app\"&gt;\u301c&lt;\/div&gt;<\/code>\u30bf\u30b0\u5185\u3067\u306f<code>Vue<\/code>\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>\u30ab\u30c6\u30b4\u30ea\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u7d9a\u3044\u3066<code>wordpress<\/code>\u304b\u3089\u30ab\u30c6\u30b4\u30ea\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9<code>getCategories()<\/code>\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n    data: {\r\n        <strong>categories: [],<\/strong>\r\n<strong>        currentCategoryId: ''<\/strong>\r\n    },\r\n    methods: {\r\n        <strong>getCategories() {   \/\/ \u30ab\u30c6\u30b4\u30ea\u4e00\u89a7\u3092\u53d6\u5f97<\/strong>\r\n\r\n<strong>            const url = '(Rest API\u306e\u30c8\u30c3\u30d7URL)wp\/v2\/categories';<\/strong>\r\n<strong>            axios.get(url)<\/strong>\r\n<strong>                .then(response =&gt; {<\/strong>\r\n\r\n<strong>                    this.categories = response.data;<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    }\r\n});<\/pre>\n<p>\u3053\u3053\u3067\u306f\u307e\u305a\u4ee5\u4e0b\uff12\u3064\u306e\u5909\u6570\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<ul>\n<li>categories\u3000\u30fb\u30fb\u30fb\u3000\u5168\u3066\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u30fb\u30c7\u30fc\u30bf<\/li>\n<li>currentCategoryId\u3000\u30fb\u30fb\u30fb\u3000\u73fe\u5728\u9078\u629e\u3055\u308c\u3066\u3044\u308b\u30ab\u30c6\u30b4\u30ea\u306eID\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u7a7a\u767d\uff09<\/li>\n<\/ul>\n<p>\u305d\u3057\u3066\u3001<code>wordpress<\/code>\u304b\u3089\u30ab\u30c6\u30b4\u30ea\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u4ee5\u4e0b\u306eURL\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<pre><strong>(Rest API\u306e\u30c8\u30c3\u30d7URL)wp\/v2\/categories<\/strong><\/pre>\n<p>\u4e2d\u8eab\u306f\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u60c5\u5831\u304c\u914d\u5217\u306b\u306a\u3063\u3066\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<pre>[\r\n    {\r\n        count: 1\r\n        description: \"\"\r\n        id: 4\r\n        link: \"http:\/\/*****\/category\/%e3%82%a4%e3%83%99%e3%83%b3%e3%83%88%e6%83%85%e5%a0%b1\/\"\r\n        meta: []\r\n        name: \"\u30a4\u30d9\u30f3\u30c8\u60c5\u5831\"\r\n        parent: 0\r\n        slug: \"%e3%82%a4%e3%83%99%e3%83%b3%e3%83%88%e6%83%85%e5%a0%b1\"\r\n        taxonomy: \"category\"\r\n    },\r\n\r\n    \/\/ \u7701\u7565\r\n]<\/pre>\n<p>\u305d\u3057\u3066\u3001\u8fd4\u3063\u3066\u304d\u305f\u30c7\u30fc\u30bf\u306f\u5148\u307b\u3069\u8ffd\u52a0\u3057\u305f\u5909\u6570<code>categories<\/code>\u3067\u4fdd\u6301\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>\u8a18\u4e8b\u3092\u53d6\u5f97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\u6b21\u306b<code>wordpress<\/code>\u304b\u3089\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<code>getPosts()<\/code>\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n    data: {\r\n        <strong>posts: [],\r\n<\/strong>        \/\/ \u7701\u7565\r\n    },\r\n    methods: {\r\n\r\n        \/\/ \u7701\u7565\r\n        <strong>getPosts() {    \/\/ \u8a18\u4e8b\u4e00\u89a7\u3092\u53d6\u5f97<\/strong>\r\n\r\n<strong>            const url = '(Rest API\u306e\u30c8\u30c3\u30d7URL)wp\/v2\/posts?categories='+ this.currentCategoryId;<\/strong>\r\n<strong>            axios.get(url)<\/strong>\r\n<strong>                .then(response =&gt; {<\/strong>\r\n\r\n<strong>                    this.posts = response.data;<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    }\r\n});<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u5148\u307b\u3069\u3068\u540c\u3058\u3088\u3046\u306b\u8a18\u4e8b\u30c7\u30fc\u30bf\u304c\u4fdd\u6301\u3055\u308c\u308b<code>posts<\/code>\u3068\u3044\u3046\u5909\u6570\u3092\u8ffd\u52a0\u3057\u3001\u4ee5\u4e0b\u306eURL\u306b<code>Ajax<\/code>\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><strong>(Rest API\u306e\u30c8\u30c3\u30d7URL)wp\/v2\/posts<\/strong><\/pre>\n<p>\u305f\u3060\u3057\u3001\u4eca\u56de\u306f\u30ab\u30c6\u30b4\u30ea\u306b\u3088\u308b\u7d5e\u308a\u8fbc\u307f\u6a5f\u80fd\u3082\u4f7f\u3048\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u306e\u3067\u3001\u5b9f\u969b\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u30ab\u30c6\u30b4\u30eaID\u3092\u542b\u3081\u308b\u5f62\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u300cRest API\u306e\u30c8\u30c3\u30d7URL\u300d\u306b<code>?<\/code>\u304c\u5165\u3063\u3066\u3044\u308b\u5834\u5408\u306f<code>&amp;categories=...<\/code>\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\uff09<\/p>\n<pre><strong>(Rest API\u306e\u30c8\u30c3\u30d7URL)wp\/v2\/posts?categories=\uff08\u9078\u629e\u4e2d\u306e\u30ab\u30c6\u30b4\u30eaID\uff09<\/strong><\/pre>\n<p>\u5b9f\u969b\u306b\u53d6\u5f97\u3055\u308c\u308b\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>[\r\n    {\r\n        author: 1\r\n        categories: [1]\r\n        comment_status: \"open\"\r\n        content: {rendered: \"&lt;p&gt;\uff08\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5185\u5bb9\uff09&lt;\/p&gt;\u21b5\", protected: false}\r\n        date: \"2019-12-11T05:56:17\"\r\n        date_gmt: \"2019-12-10T20:56:17\"\r\n        excerpt: {rendered: \"&lt;p&gt;\uff08\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u8981\u7d04\uff09&lt;\/p&gt;\u21b5\", protected: false}\r\n\r\n        \/\/ \u7701\u7565\r\n\r\n    },\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n]<\/pre>\n<p>\u305d\u3057\u3066\u3001<code>Ajax<\/code>\u3067\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u305f\u3089\u3001<code>posts<\/code>\u306e\u4e2d\u306b\u3053\u308c\u3089\u306e\u30c7\u30fc\u30bf\u304c\u683c\u7d0d\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h1>\u30da\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3089\u30ab\u30c6\u30b4\u30ea\u3068\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b<\/h1>\n<p>\u3053\u3053\u307e\u3067\u3067<code>getCategories()<\/code>\u3068<code>getPosts()<\/code>\u3068\u3044\u3046\uff12\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304f\u3063\u3066\u304d\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u307e\u307e\u3067\u306f\u5b9f\u969b\u306b\u5b9f\u884c\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u305f\u3081\u3001\u30da\u30fc\u30b8\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u3089\u3059\u3050\u5b9f\u884c\u3055\u308c\u308b\u3088\u3046\u306b<code>mounted()<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>mounted() {<\/strong>\r\n\r\n<strong>        this.getCategories(); \/\/ \u30ab\u30c6\u30b4\u30ea\u3092\u53d6\u5f97<\/strong>\r\n<strong>        this.getPosts(); \/\/ \u8a18\u4e8b\u3092\u53d6\u5f97<\/strong>\r\n\r\n<strong>    }<\/strong>\r\n});<\/pre>\n<h1>\u30ab\u30c6\u30b4\u30ea\u3092\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3067\u9078\u629e\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u3053\u304b\u3089HTML\u5185\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u3044\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u307e\u305a\u306f<code>Ajax<\/code>\u3067\u53d6\u5f97\u3059\u308b\u30ab\u30c6\u30b4\u30ea\u30fb\u30c7\u30fc\u30bf\u3092\u4f7f\u3063\u3066\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3092\u3064\u304f\u308a\u3001\u8868\u793a\u3057\u305f\u3044\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u30ab\u30c6\u30b4\u30ea\u3067\u7d5e\u308a\u8fbc\u307f\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>&lt;div id=\"app\" class=\"container\"&gt;\r\n    &lt;h1 class=\"mb-5\"&gt;wordpress\u306eRest API\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb&lt;\/h1&gt;\r\n    &lt;div class=\"row mb-3\"&gt;\r\n        &lt;div class=\"col-12\"&gt;\r\n            &lt;div class=\"row\"&gt;\r\n                &lt;div class=\"col-2\"&gt;\r\n                    &lt;label&gt;\r\n                        &lt;input type=\"radio\" value=\"\" v-model=\"currentCategoryId\"&gt;\r\n                        &lt;span&gt;\u5168\u3066\u306e\u30ab\u30c6\u30b4\u30ea&lt;\/span&gt;\r\n                    &lt;\/label&gt;\r\n                &lt;\/div&gt;\r\n                <strong>&lt;div class=\"col-2\" v-for=\"category in categories\"&gt;<\/strong>\r\n<strong>                    &lt;label&gt;<\/strong>\r\n<strong>                        &lt;input type=\"radio\" :value=\"category.id\" v-model=\"currentCategoryId\"&gt;<\/strong>\r\n<strong>                        &lt;span v-text=\"category.name\"&gt;&lt;\/span&gt;<\/strong>\r\n<strong>                    &lt;\/label&gt;<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n            &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u306f\u3001\u30ab\u30c6\u30b4\u30ea\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u304f\u308b<code>categories<\/code>\u5909\u6570\u3092<code>v-for<\/code>\u3067\u30eb\u30fc\u30d7\u3055\u305b\u3066\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3092\uff11\u3064\u305a\u3064\u4f5c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u4f5c\u6210\u3055\u308c\u308b\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u306b<code>v-model<\/code>\u3092\u3064\u3051\u3066\u3001\u9078\u629e\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u5834\u5408<code>currentCategoryId<\/code>\u306e\u5024\u3082\u5909\u66f4\u306b\u306a\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002\uff08\u3053\u306e\u5024\u306f\u5148\u307b\u3069\u3064\u304f\u3063\u305f<code>getPosts()<\/code>\u306e\u4e2d\u3067\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u4f7f\u308f\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<p>\u3067\u306f\u3053\u306e\u6642\u70b9\u3067\u3069\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5291\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_1.png\" alt=\"\" width=\"640\" height=\"171\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_1.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_1-300x80.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h1>\u30ab\u30c6\u30b4\u30ea\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3059\u308b<\/h1>\n<p>\u30ab\u30c6\u30b4\u30ea\u3092\u9078\u629e\u3059\u308b\u30e9\u30b8\u30aa\u30dc\u30bf\u30f3\u3092\u3064\u304f\u3063\u305f\u306e\u3067\u3001\u3082\u3057\u30ab\u30c6\u30b4\u30ea\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u3089\u3001\u305d\u306e\u9078\u629e\u3055\u308c\u305f\u30ab\u30c6\u30b4\u30ea\u306b\u8a72\u5f53\u3059\u308b\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>new Vue({\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    <strong>watch: {<\/strong>\r\n<strong>        currentCategoryId() {   \/\/ \u30ab\u30c6\u30b4\u30ea\u306e\u9078\u629e\u304c\u5909\u66f4\u306b\u306a\u3063\u305f\u3068\u304d\u5b9f\u884c<\/strong>\r\n\r\n<strong>            this.getPosts();<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n<strong>    },<\/strong>\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n});<\/pre>\n<p>\u3061\u306a\u307f\u306b<code>watch<\/code>\u306f\u7279\u5b9a\u306e\u5909\u6570\u306b\u5909\u5316\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u76e3\u8996\u3059\u308b\u5f79\u5272\u3092\u3082\u3063\u3066\u3044\u3066\u3001\u4eca\u56de\u306e\u5834\u5408\u306f\u5909\u6570<code>currentCategoryId<\/code>\u3092\u76e3\u8996\u3059\u308b\u305f\u3081\u306b<code>currentCategoryId()<\/code>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u3053\u306e\u4e2d\u3067\u306f<code>getPosts()<\/code>\u3092\u5b9f\u884c\u3057\u3066\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u8a18\u4e8b\u306e\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b\u90e8\u5206\u3092\u3064\u304f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u4eca\u56de\u306e\u30e1\u30a4\u30f3\u306b\u306a\u308b<code>wordpress<\/code>\u306e\u8a18\u4e8b\u3092\u4e00\u89a7\u3067\u8868\u793a\u3059\u308b\u90e8\u5206\u3092\u3064\u304f\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002\u8a18\u4e8b\u30c7\u30fc\u30bf\u3092\u3059\u3067\u306b\u53d6\u5f97\u3067\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u3042\u3068\u306f<code>Vue<\/code>\u3067\u8868\u793a\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<pre>&lt;div id=\"app\" class=\"container\"&gt;\r\n    &lt;!-- \u7701\u7565 --&gt;\r\n    &lt;div class=\"row\"&gt;\r\n        <strong>&lt;div class=\"col-4 p-2\" v-for=\"post in posts\"&gt;<\/strong>\r\n<strong>            &lt;div class=\"card\"&gt;<\/strong>\r\n<strong>                &lt;div class=\"card-body\"&gt;<\/strong>\r\n<strong>                    &lt;h5 class=\"card-title\" v-text=\"post.title.rendered\"&gt;&lt;\/h5&gt;<\/strong>\r\n<strong>                    &lt;h6 class=\"card-subtitle mb-2 text-muted\" v-text=\"getDate(post.date)\"&gt;&lt;\/h6&gt;<\/strong>\r\n<strong>                    &lt;p class=\"card-text\" v-html=\"post.excerpt.rendered\"&gt;&lt;\/p&gt;<\/strong>\r\n<strong>                    &lt;div class=\"text-right\"&gt;<\/strong>\r\n<strong>                        &lt;a :href=\"post.link\" class=\"card-link\"&gt;\u8868\u793a\u3059\u308b&lt;\/a&gt;<\/strong>\r\n<strong>                    &lt;\/div&gt;<\/strong>\r\n<strong>                &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n<strong>        &lt;div v-if=\"!posts.length\"&gt;<\/strong>\r\n<strong>            \u8a18\u4e8b\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/strong>\r\n<strong>        &lt;\/div&gt;<\/strong>\r\n    &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>\u3053\u3053\u3067\u306f\u3001\u307e\u305a\u8a18\u4e8b\u30c7\u30fc\u30bf\u304c\u5165\u3063\u305f<code>posts<\/code>\u3092<code>v-for<\/code>\u3067\u30eb\u30fc\u30d7\u3055\u305b\u3066\u3044\u304f\u306e\u3067\u3059\u304c\u3001\u5c11\u3057\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u304c<code>getDate()<\/code>\u3067\u3059\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001<code>wordpress<\/code>\u304c\u63d0\u4f9b\u3059\u308b\u6295\u7a3f\u6642\u9593\u306e\u30c7\u30fc\u30bf\u306f\u6b21\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u305f\u3081\u3001\u4e00\u65e6<code>Date<\/code>\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3057\u5e74\u6708\u65e5\u3060\u3051\u62bd\u51fa\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<pre><strong>2019-12-10T20:56:17<\/strong><\/pre>\n<p>\u203b <code>getDate()<\/code>\u306f\u6b21\u306e\u9805\u76ee\u3067\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u306f<code>posts<\/code>\u304c\u7a7a\u306e\u3068\u304d\u3001\u3064\u307e\u308a\u8a18\u4e8b\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u3066\u3044\u306a\u3044\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308b\u90e8\u5206\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>&lt;div <strong>v-if=\"!posts.length\"<\/strong>&gt;\r\n    \u8a18\u4e8b\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\r\n&lt;\/div&gt;<\/pre>\n<h1>\u6295\u7a3f\u5e74\u6708\u65e5\u3092\u4f5c\u6210\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u3064\u304f\u308b<\/h1>\n<p>\uff11\u3064\u524d\u306e\u9805\u76ee\u3067\u5c11\u3057\u66f8\u304d\u307e\u3057\u305f\u304c\u3001<code>wordpress<\/code>\u306e\u6295\u7a3f\u65e5\u6642\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u5e74\u6708\u65e5\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\u305f\u3081\u306b<code>getDate()<\/code>\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre>new Vue({\r\n    el: '#app',\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n    methods: {\r\n\r\n        \/\/ \u7701\u7565\r\n\r\n        <strong>getDate(date) {<\/strong>\r\n\r\n<strong>            const dt = new Date(date);<\/strong>\r\n<strong>            return dt.getFullYear() +'\/'+ (dt.getMonth() + 1) +'\/'+ dt.getDate()<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    },\r\n\r\n    \/\/ \u7701\u7565\r\n\r\n});<\/pre>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u3053\u306e\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u5148\u3092\u3053\u306e\u30d6\u30ed\u30b0\u306b\u3057\u3066\u30c6\u30b9\u30c8\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u307e\u305a\u306f\u30da\u30fc\u30b8\u3092\u958b\u3044\u305f\u3068\u3053\u308d\uff08\u3064\u307e\u308a\u3001\u5168\u30ab\u30c6\u30b4\u30ea\u306e\u8a18\u4e8b\u306b\u306a\u308a\u307e\u3059\uff09<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5296\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_4.png\" alt=\"\" width=\"640\" height=\"420\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_4.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_4-300x197.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u7d9a\u3044\u3066\u3001\u30ab\u30c6\u30b4\u30ea\u3092\u5909\u66f4\u3057\u3066\u8a18\u4e8b\u306e\u5185\u5bb9\u304c\u5909\u308f\u308b\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5297\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_5.png\" alt=\"\" width=\"640\" height=\"344\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/12\/wordpress_list_5-300x161.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\uff01\u3046\u307e\u304f\u3044\u304d\u307e\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<code>CDN<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u5c55\u958b\u3057\u305f\u3089\u3059\u3050\u8a66\u305b\u307e\u3059\u3088\u2728<\/p>\n<p>\u203b \u305f\u3060\u3057\u3001<strong>\u300cRest API\u306eURL\u300d<\/strong>\u306f\u3053\u306e\u30d6\u30ed\u30b0\u306e\u3082\u306e\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3054\u81ea\u8eab\u306e\u3082\u306e\u3068\u5165\u308c\u66ff\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=5298&amp;tmstv=1777541001\" rel=\"nofollow\" id=\"download-link-5298\" data-redirect=\"false\" >\n\twordpress\u306eRest API\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u4e00\u89a7\u8868\u793a<\/a>\n\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f<code>wordpress<\/code>\u3068<code>Vue<\/code>\u306e\u9023\u643a\u3057\u3066\u5916\u90e8\u30b5\u30a4\u30c8\u306b\u8a18\u4e8b\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><code>wordpress<\/code>\u306b\u306f\u7279\u5225\u96e3\u3057\u3044\u8a2d\u5b9a\u306a\u3069\u4f55\u3082\u3057\u306a\u304f\u3066\u3082<code>API<\/code>\u304c\u4f7f\u3048\u308b\u3063\u3066\u3044\u3046\u306e\u306f\u306a\u304b\u306a\u304b\u3059\u3054\u3044\u3053\u3068\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u306e\u6a5f\u80fd\u3092\u4f7f\u3048\u3070\u3044\u308d\u3044\u308d\u3068\u9762\u767d\u3044\u6a5f\u80fd\u3092\u3064\u304f\u308c\u308b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u305c\u3072\u7686\u3055\u3093\u3082\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-417 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png\" alt=\"\" width=\"370\" height=\"220\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2018\/04\/9-300x178.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u524d\u3005\u56de\u306e\u8a18\u4e8b\u300c\u30b3\u30d4\u30da\u3067OK\uff01Laravel\u304b\u3089wordpress\u306b\u6295\u7a3f\u3059\u308b\u6a5f\u80fd\u300d\u3067\u306f\u3001Laravel\u3068wordpress\u306e\u9023\u643a\u3059\u308b\u5185\u5bb9\u3092\u304a\u5c4a\u3051\u3057\u307e\u3057\u305f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=5289\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010Vue\u3011wordpress\u306eRest API\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u4e00\u89a7\u8868\u793a\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":5302,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,59],"tags":[134],"class_list":["post-5289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue-js","category-wordpress","tag-api"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5289"}],"version-history":[{"count":6,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5289\/revisions"}],"predecessor-version":[{"id":5304,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/5289\/revisions\/5304"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/5302"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}