admin管理员组文章数量:1122832
Use on the blog reverse pagination. The question arose. How to make a home page is not the first? Need to break the link Home
= First page
and make a connection Home
= Last page
.
Home should be the last. For example on a blog with 20 pages: Opening the site at httр://www.example
I get to the home page. And this the same page at the address httр://www.example/page/1/
I want to do the opposite: httр://www.example
opens page 20
(httр://www.example = httр://www.example/page/20/
).
For example like this . Home is the last, not the first.
Use on the blog reverse pagination. The question arose. How to make a home page is not the first? Need to break the link Home
= First page
and make a connection Home
= Last page
.
Home should be the last. For example on a blog with 20 pages: Opening the site at httр://www.example.com
I get to the home page. And this the same page at the address httр://www.example.com/page/1/
I want to do the opposite: httр://www.example.com
opens page 20
(httр://www.example.com = httр://www.example.com/page/20/
).
For example like this http://izismile.com. Home is the last, not the first.
Share Improve this question edited Sep 16, 2013 at 8:40 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Sep 16, 2013 at 5:29 AnatoliyAnatoliy 11 bronze badge 3- Can you just describe your question more clearly? – Vinod Dalvi Commented Sep 16, 2013 at 6:25
- are you want to change order of your posts? – Anjum Commented Sep 16, 2013 at 10:06
- no. see example this izismile.com. Home is the last, not the first. – Anatoliy Commented Sep 16, 2013 at 10:29
1 Answer
Reset to default 0The default order of posts is date descending.
To reverse it for home page you could hook into pre_get_posts
and for is_home()
query set order
parameter to ASC
.
Note that that pages would still go from 1 ascending, they will just have posts on them in opposite order. I don't think actually reversing order of pages is easily doable.
本文标签: frontpageReverse ordered pagination on home page
版权声明:本文标题:frontpage - Reverse ordered pagination on home page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736292143a1928872.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论