{"action":"created","issue":{"url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/5","labels_url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/5/comments","events_url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/5/events","html_url":"https://github.com/airesvsg/acf-to-wp-rest-api/issues/5","id":122728931,"number":5,"title":"ACF not showing in Custom Post type","user":{"login":"fabioquarantini","id":425733,"avatar_url":"https://avatars.githubusercontent.com/u/425733?v=3","gravatar_id":"","url":"https://api.github.com/users/fabioquarantini","html_url":"https://github.com/fabioquarantini","followers_url":"https://api.github.com/users/fabioquarantini/followers","following_url":"https://api.github.com/users/fabioquarantini/following{/other_user}","gists_url":"https://api.github.com/users/fabioquarantini/gists{/gist_id}","starred_url":"https://api.github.com/users/fabioquarantini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabioquarantini/subscriptions","organizations_url":"https://api.github.com/users/fabioquarantini/orgs","repos_url":"https://api.github.com/users/fabioquarantini/repos","events_url":"https://api.github.com/users/fabioquarantini/events{/privacy}","received_events_url":"https://api.github.com/users/fabioquarantini/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-17T12:51:06Z","updated_at":"2015-12-17T17:22:51Z","closed_at":"2015-12-17T15:07:22Z","body":"Hello\r\nThanks for this great plugin.\r\nI'm having trouble retrieving the acf fields in my cpt response.\r\nCurrently im making this call:\r\nGET http://website.com/wp-json/v2/locals/<id>\r\nthe \"acf\" field is not displaying.\r\n\r\nThis is what I added in my functions.php\r\n```\r\nadd_action( 'init', 'my_custom_post_type_rest_support', 25 );\r\n\r\nfunction my_custom_post_type_rest_support() {\r\n\tglobal $wp_post_types;\r\n\t$post_type_name = 'locals';\r\n\tif( isset( $wp_post_types[ $post_type_name ] ) ) {\r\n\t\t$wp_post_types[$post_type_name]->show_in_rest = true;\r\n\t\t$wp_post_types[$post_type_name]->rest_base = $post_type_name;\r\n\t\t$wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';\r\n\t}\r\n}\r\n```\r\n\r\n\"acf\" field is showing up only in posts but not in my CPT, any suggestion?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/comments/165520296","html_url":"https://github.com/airesvsg/acf-to-wp-rest-api/issues/5#issuecomment-165520296","issue_url":"https://api.github.com/repos/airesvsg/acf-to-wp-rest-api/issues/5","id":165520296,"user":{"login":"airesvsg","id":396668,"avatar_url":"https://avatars.githubusercontent.com/u/396668?v=3","gravatar_id":"","url":"https://api.github.com/users/airesvsg","html_url":"https://github.com/airesvsg","followers_url":"https://api.github.com/users/airesvsg/followers","following_url":"https://api.github.com/users/airesvsg/following{/other_user}","gists_url":"https://api.github.com/users/airesvsg/gists{/gist_id}","starred_url":"https://api.github.com/users/airesvsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airesvsg/subscriptions","organizations_url":"https://api.github.com/users/airesvsg/orgs","repos_url":"https://api.github.com/users/airesvsg/repos","events_url":"https://api.github.com/users/airesvsg/events{/privacy}","received_events_url":"https://api.github.com/users/airesvsg/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T17:22:51Z","updated_at":"2015-12-17T17:22:51Z","body":"can you send your fles for me?\r\nairesvsg@gmail.com"}}