激活ACF對REST API,打破WP REST APIWordPres ACF對REST的API && REST API
如果我激活WP REST API,我可以檢索數據:(目前在網站上同時啓用,所以鏈接會顯示錯誤)
http://ecommerce-ux.london/wp-json/wp/v2/posts?slug=hello-world
http://ecommerce-ux.london/wp-json/wp/v2/posts/1
電流誤差性反應是
<br />
<b>Fatal error</b>: Using $this when not in object context in <b>/home/commercect/public_html/wp-content/plugins/acf-to-rest-api-master/v3/lib/endpoints/class-acf-to-rest-api-controller.php</b> on line <b>54</b><br />
以上鍊接不起作用,但如果我這樣做: http://ecommerce-ux.london/wp-json/wp/v2 它給我的API調用。
因爲我需要檢索的自定義字段爲我的單篇文章頁面,我設置ACF以REST API,但打破我的端點WP/2插件,我不能再檢索數據,但ACF做工作:
http://ecommerce-ux.london/wp-json/acf/v3/posts/1
性反應是
{"acf":{"":false,"anchor":[{"anchor_name":"Heading","anchor_link":"heading-name"}]}}
插件
WP REST API 用於WordPress的基於SON的REST API 版本2.0-beta15 |通過WP REST API團隊 http://v2.wp-api.org/
ACF以REST API 版本3.0.1-β|通過AiresGonçalves| https://github.com/airesvsg/acf-to-rest-api
有沒有人知道工作?