如何在WordPress的类别页面上显示所有帖子

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:

更新:看起来原始页面已关闭,所以这是一个镜像副本:

Download mirror copy here

在此处下载镜像副本

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/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值