One of the gripes I’ve always had with the built-in WordPress functionality is that you can only specify the number of posts per page across the entire application, as opposed to being able to customize it per section or page. Thanks to a wonderful plugin by Matt Read, you can fix this easily.
我对WordPress内置功能的一贯困惑是,您只能指定整个应用程序中每页的帖子数,而不是能够按节或页面自定义。 感谢Matt Read提供的出色插件,您可以轻松解决此问题。
First, you’ll want to grab the plugin from his website and install it. If you are unaware, that means unzipping and uploading the file into your BLOGROOT/wp-content/plugins/ directory.
首先,您需要从他的网站上获取插件并进行安装。 如果您不知道,则意味着将文件解压缩并上传到BLOGROOT / wp-content / plugins /目录中。
Update: Looks like the original page is down, so here’s a mirror copy:
更新:看起来原始页面已关闭,所以这是一个镜像副本:
He’s got a donate button. If this article helps you, then donate money to him, not me.
他有一个捐赠按钮。 如果这篇文章对您有帮助,那就把钱捐给他,而不是我。
Once the plugin is installed, you will navigate in your control panel to the Plugins page, and Activate the CQS plugin. Head over to Options / CQS and you should be presented with this screen.
安装插件后,您将在控制面板中导航到“插件”页面,然后激活CQS插件。 转到选项/ CQS,应该显示此屏幕。
I’ve already customized mine… you should change the Query dropdown to “is_category”, set the Show condition to -1 (for all posts), and click the Add button.
我已经自定义了我的…您应该将“查询”下拉列表更改为“ is_category”,将“显示条件”设置为-1(对于所有帖子),然后单击“添加”按钮。
I’ve also gone further and added a new condition so the Home page only shows 5 posts per page. I dislike cluttered homepages.
我也走得更远并添加了新条件,因此“主页”每页仅显示5个帖子。 我不喜欢混乱的首页。
翻译自: https://www.howtogeek.com/howto/blogging/how-to-display-all-posts-on-the-category-page-in-wordpress/