{"id":1491,"date":"2016-02-29T18:33:00","date_gmt":"2016-02-29T17:33:00","guid":{"rendered":"http:\/\/hesmid.nl\/test\/?p=1491"},"modified":"2016-02-29T18:33:00","modified_gmt":"2016-02-29T17:33:00","slug":"wp-rest-api-with-custom-post-types-and-advanced-custom-fields","status":"publish","type":"post","link":"https:\/\/hesmid.nl\/test\/wp-rest-api-with-custom-post-types-and-advanced-custom-fields\/","title":{"rendered":"WP Rest API with Custom post types and \/ Advanced custom fields"},"content":{"rendered":"<h3>Prerequisites:<\/h3>\n<ul>\n<li>Install the <a href=\"https:\/\/github.com\/WP-API\/WP-API\">WP REST API<\/a> plugin<\/li>\n<li>Install the plugin\u00a0<a href=\"http:\/\/github.com\/airesvsg\/acf-to-rest-api\">ACF to REST API<\/a>\u00a0V2\n<ul>\n<li>Note: another plugin &#8216;ACF to WP API&#8217; didn&#8217;t work for me<\/li>\n<\/ul>\n<\/li>\n<li>Install the Chrome plugin <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/postman\/fhbjgbiflinjbdggehcddcbncdddomop?utm_source=chrome-app-launcher-info-dialog\">Postman\n<p><\/a><\/li>\n<\/ul>\n<h3>Make it work<\/h3>\n<ul>\n<li>Create a Custom post Type\n<ul>\n<li>Set\u00a0Show in REST API to TRUE<\/li>\n<li>enter a REST API base slug (need this for your requests)<\/li>\n<\/ul>\n<\/li>\n<li>Create some ACF fields for the custom post type<\/li>\n<li>Create a Custom post<\/li>\n<li>Test the API in Postman:<br \/>\nGET \u00a0 \u00a0http:\/\/localhost\/sitename\/wp-json\/wp\/v2\/rest-api-base-slug<\/p>\n<p>You should see a json file with acf fields<\/li>\n<li><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites: Install the WP REST API plugin Install the plugin\u00a0ACF to REST API\u00a0V2 Note: another plugin &#8216;ACF to WP API&#8217; didn&#8217;t work for me Install the Chrome plugin Postman Make it work Create a Custom post Type Set\u00a0Show in REST API to TRUE enter a REST API base slug (need this for your requests) Create [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[42,189,190,188],"acf":[],"_links":{"self":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1491"}],"collection":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/comments?post=1491"}],"version-history":[{"count":1,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1491\/revisions"}],"predecessor-version":[{"id":1492,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/posts\/1491\/revisions\/1492"}],"wp:attachment":[{"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/media?parent=1491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/categories?post=1491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hesmid.nl\/test\/wp-json\/wp\/v2\/tags?post=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}