Wordpress/React 项目只显示 10 个帖子
Wordpress/React project only showing 10 posts
我创建了一个使用 Wordpress REST API 作为后端的 React.js 页面,试图让我的 Archive/Blog 页面显示我的所有帖子。我已将 Wordpress 设置设为 30:
但仍然 - 仅显示 10 个帖子:
这是我的 React 项目:https://github.com/fransbernhard/wordpressReactSassWebpack
这是我的 wordpress 主题:
https://github.com/fransbernhard/wordpress-theme
谢谢。
您可以在查询中添加参数?per_page=30
。
我创建了一个使用 Wordpress REST API 作为后端的 React.js 页面,试图让我的 Archive/Blog 页面显示我的所有帖子。我已将 Wordpress 设置设为 30:
但仍然 - 仅显示 10 个帖子:
这是我的 React 项目:https://github.com/fransbernhard/wordpressReactSassWebpack
这是我的 wordpress 主题: https://github.com/fransbernhard/wordpress-theme
谢谢。
您可以在查询中添加参数?per_page=30
。