angularjs - http ://localhost/wp-json/wp/v2/posts in wordpress using REST API V2 上的 404

标签 angularjs wordpress rest routes wordpress-rest-api

我在 http://localhost/wp-json/wp/v2/posts 上收到 404路线。我将永久链接类型更改为普通。仍然遇到同样的问题。

如果它有用,我是 ubuntu 16.04 桌面,最近从 15.10 升级,遇到了 php5.6 到 7.0 升级的问题。我现在使用 php 7.0

编辑1: 尝试了所有其他永久链接设置组合,没有结果!

最佳答案

http://localhost/?rest_route=/wp/v2/posts 应该有效。 引用https://developer.wordpress.org/rest-api/using-the-rest-api/discovery/了解详情。

关于angularjs - http ://localhost/wp-json/wp/v2/posts in wordpress using REST API V2 上的 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44750315/

相关文章:

angularjs - ui-grid 中的垂直列标题文本

html - 如何在wordpress网站中添加强SEO信息?

php - 强制使用NGinx,Varnish和专用IP的多个网站从非www到www

java - 使用 Spring Boot RestTemplate 解析嵌套元素会出现 JSON 解析错误

javascript - Microsoft Edge 浏览器缓存中的 RESTful Angular 应用

php - PHP : {'error' : "Missing ' inputs' or 'instances' key"} 中的休息 API

javascript - 选择的 ng-options 不使用对象作为模型 [Angular 1.5]

javascript - Protractor 失败 : browser. findElements(...).all 不是函数

javascript - Angular : how to update value when range input modified via code

linux - 编译器 : not found ls: cannot access/usr/bin/convert