简体   繁体   English

分页不适用于固定链接的邮政名

[英]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.

相关问题 设置为postname时,WordPress永久链接不起作用 - Wordpress permalink is not working when set to postname WordPress%postname%permalink返回404 - WordPress %postname% permalink returns 404 分页不适用于帖子名称永久链接,但适用于普通永久链接 - Pagination not working on Post name permalink but working on plain permalink 将所有博客文章从 %postname% 永久链接结构重定向到 /news/%postname% - Redirect all blog posts from %postname% permalink structure to /news/%postname% Wordpress Nginx永久链接从纯名称到邮政名称 - Wordpress Nginx Permalink from plain to postname 在wordpress网站上的分页正在使用普通的永久链接(com /?p = 123),但无法使用自定义(/%postname%/) - Pagination at wordpress site is working with plain permalinks (com/?p=123) but not with custom (/%postname%/) 更改永久链接结构时,自定义页面模板分页不起作用 - Custom page template pagination not working when permalink structure is changed WordPress分页在帖子名称为Permalink的首页中不起作用 - Wordpress pagination not working in home page with Post name Permalink 手动将 WordPress 数据库从域转移到另一个域,在固定链接中使用 postname - Manually transfer WordPress database from domain to another domain with postname in permalink 将永久链接结构更改为postname时,Wordpress localhost产生404页 - Wordpress localhost results in 404 pages when changing permalink structure to postname
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM