最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Ability to change homepage on Wordpress using API

programmeradmin7浏览0评论

Is there any way to change a site's homepage (Settings -> Reading), via API? We're running a React app with a Headless WP 'backend', and I'd like to let users change the homepage of their sites though our app.

I searched but couldn't find a solution to this.

Thanks

Is there any way to change a site's homepage (Settings -> Reading), via API? We're running a React app with a Headless WP 'backend', and I'd like to let users change the homepage of their sites though our app.

I searched but couldn't find a solution to this.

Thanks

Share Improve this question asked Sep 22, 2020 at 20:21 Ilya GurmanIlya Gurman 1
Add a comment  | 

2 Answers 2

Reset to default 0

It appears you can change some settings via the REST API, but it doesn't look like the Home Page is one of them. At least, it doesn't seem to appear in the REST API > Site Settings documentation.

Well you can't really change the whole homepage using API. Instead you could fetch different parts like Posts, Categories and display them using the API.

发布评论

评论列表(0)

  1. 暂无评论