自定义帖子类型分页
我正在尝试打印多种帖子类型的多个帖子。但是,我似乎无法实现分页 - 一旦我转到 .../category.../page/2 ,我就会收到页面未找到错误。看起来它甚至没有尝试读取我的 archive.php 文件中的内容。
我 100% 确定永久链接没有问题,因为我尝试过重置它们等。
我想这与管理设置中每页帖子数设置为 10 的事实有关,但我确实需要能够动态编辑这个数字。
我在这里尝试了各种修复方法,但似乎都不起作用: http://wordpress.org/support/topic/pagination-with-custom-post-type-getting-a-404?replies=1#post-1616810
抱歉,如果这是一个高度重复的问题 - 我发现没有其他修复对我有用。
多谢!
I'm trying to print out a number of posts from multiple post types. However, I can't seem to implement the pagination - once I go to .../category.../page/2 I get a page not found error. It seems like it doesn't even try to read what's inside of my archive.php file.
I'm 100% sure that there's no problem with permalinks, since I've tried resetting them and etc.
I suppose it has something to do with the fact that in admin settings the number of posts per page is set to 10, but i really need to be able to edit this number dynamically.
I've tried a variaty of fixes from here, but non of them seem to work: http://wordpress.org/support/topic/pagination-with-custom-post-type-getting-a-404?replies=1#post-1616810
I'm sorry if it's highly repetitive question - none of other fixes I found worked for me.
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以做这样的事情(未经测试):
You can do something like this (not tested):