[英]pagination not working with permalink postname
I know most of the people have faced with this problem.With pagination the first page is showing correctly and the second page link gets like 'services/paged/2/' -page not found .And my problem is, though it is in wordpress what i am showing on the page is not posts content from a category,There is a table in my database which stores some registration information and that information is to be shown on my website.The query is so normal as we do for php site 我知道大多数人都遇到了这个问题。通过分页,第一页显示正确,第二页链接变得像'services / paged / 2 /'-找不到页面。而我的问题是,尽管它在wordpress中我在页面上显示的内容不是来自某个类别的内容,我的数据库中有一个表,用于存储一些注册信息,该信息将显示在我的网站上。查询与我们对php网站的查询一样正常
select * from registration
What I am doing is a normal php pagination ,but when it comes to linking the wordpress pagination does affects.what to do without any change in my permalink custom structure .Please help 我正在做的是正常的php分页,但是当涉及到wordpress分页时,确实会影响到。我的永久链接自定义结构没有任何更改,该怎么做。请帮助
The correct way to do this would be to add in custom routing for your pagination. 正确的方法是为分页添加自定义路由。 Wordpress needs to know that paged/2 refers to pagination and not a page. WordPress需要知道paged / 2是指分页而不是页面。 Currently it doesn't, which is why you're getting a 404. You'll also need to then rewrite your query to use the pagination parameters provided in the query string. 当前没有,这就是为什么要获得404的原因。然后,您还需要重写查询以使用查询字符串中提供的分页参数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.