{"action":"created","issue":{"url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/66","repository_url":"https://api.github.com/repos/airesvsg/acf-to-rest-api","labels_url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/66/comments","events_url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/66/events","html_url":"https://github.com/airesvsg/acf-to-rest-api/issues/66","id":176024917,"number":66,"title":"GET request from wp, only custom field posts needed","user":{"login":"st-small","id":1850189,"avatar_url":"https://avatars.githubusercontent.com/u/1850189?v=3","gravatar_id":"","url":"https://api.github.com/users/st-small","html_url":"https://github.com/st-small","followers_url":"https://api.github.com/users/st-small/followers","following_url":"https://api.github.com/users/st-small/following{/other_user}","gists_url":"https://api.github.com/users/st-small/gists{/gist_id}","starred_url":"https://api.github.com/users/st-small/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/st-small/subscriptions","organizations_url":"https://api.github.com/users/st-small/orgs","repos_url":"https://api.github.com/users/st-small/repos","events_url":"https://api.github.com/users/st-small/events{/privacy}","received_events_url":"https://api.github.com/users/st-small/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-09T14:35:22Z","updated_at":"2016-09-09T17:42:12Z","closed_at":"2016-09-09T17:42:12Z","body":"Hi guys! I'm very happy to find this plugin, because all web admins told me that it is impossible to get custom fields in my requests... I'm not web programmer and can't write by PHP (and can't read too...),  I'm writing the app for iOS and need to have GET request like this: \r\nwww.mysite.com/wp-json/wp/v2/posts?offer=true (where \"offer\" is my custom field) - I need to have posts only with field offer=true.\r\n\r\nThank you very much.\r\n\r\n![2016-09-09 17 21 54](https://cloud.githubusercontent.com/assets/1850189/18390649/be0044ea-76b3-11e6-8c25-ad9cb5f6a654.png)\r\n"},"comment":{"url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/comments/245985760","html_url":"https://github.com/airesvsg/acf-to-rest-api/issues/66#issuecomment-245985760","issue_url":"https://api.github.com/repos/airesvsg/acf-to-rest-api/issues/66","id":245985760,"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":"2016-09-09T17:42:12Z","updated_at":"2016-09-09T17:42:12Z","body":"Hi @st-small,\r\nplease add this snippet in your `functions.php`.\r\n```PHP\r\nfunction rest_api_allow_meta_query( $valid_vars ) {\r\n    $valid_vars[] = 'meta_key';\r\n    $valid_vars[] = 'meta_value';\r\n\r\n    return $valid_vars;\r\n}\r\n\r\nadd_filter( 'rest_query_vars', 'rest_api_allow_meta_query' );\r\n```\r\n\r\nhttp://www.mysite.com/wp-json/wp/v2/posts?filter[meta_key]=offer&filter[meta_value]=1\r\n\r\nThanks"}}
{"actor":{"display_login":"airesvsg"}}