简体   繁体   English

如何使用Wordpress的REST Api访问本地主机上的数据?

[英]How can I use Wordpress' REST Api to access data on my local host?

I've been working on a wordpress blog on my local host and I need to do a proof of concept with the wordpress' REST Api - how can I request data from something on my local host? 我一直在本地主机上的wordpress博客上工作,我需要使用wordpress的REST Api进行概念验证-如何从本地主机上的数据中请求数据? I couldn't find much documentation on how to use the REST Api, can someone help me? 我找不到有关如何使用REST Api的大量文档,有人可以帮助我吗? Thanks! 谢谢!

Actually, using Jetpack, you now have access to the REST API as long as your self hosted WordPress is activated with Jetpack ;) Working on using this right now. 实际上,只要您使用Jetpack激活了自托管的WordPress,就可以使用Jetpack来访问REST API了;)现在就使用此功能。 http://developer.wordpress.com/2012/10/26/using-the-rest-api-with-wordpress-org-self-hosted-sites-via-jetpack/ http://developer.wordpress.com/2012/10/26/using-the-rest-api-with-wordpress-org-self-hosted-sites-via-jetpack/

There is no way to do this using Wordpress' REST API as it is only for blogs on the Wordpress domain. 使用Wordpress的REST API无法做到这一点,因为它仅适用于Wordpress域上的博客。 However, there are several plugins for Wordpress blogs created by other users which you can install locally and use to access your data through REST API calls. 但是,有几个由其他用户创建的Wordpress博客插件,您可以在本地安装它们,并使用它们通过REST API调用访问数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM