Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
    
Can you just describe your question more clearly? –  Vinod Dalvi Sep 16 '13 at 6:25
    
are you want to change order of your posts? –  Anjum Sep 16 '13 at 10:06
    
no. see example this izismile.com. Home is the last, not the first. –  Anatoliy Sep 16 '13 at 10:29

1 Answer 1

The 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.

share|improve this answer
    
the fact is that the very reverse pagination is done. Entries go as expected. Code took here wordpress.stackexchange.com/questions/60547/… works fine.There was only one problem. Home starnitsa this page / 1 /, and the need to page/20 /How to make a home page www :/ / example.com/page/20 /??? sorry for my english. Use the program interpreter –  Anatoliy Sep 16 '13 at 12:56
    
If you are interested found a solution. wp-includes/query.php the file in block / / Paging in the variable $page gave meaning max_num_pagesgot what he wanted. main = page/20 (or page/21....999 depends max_num_pages) ie reverse pagination work was completely wrong. –  Anatoliy Sep 17 '13 at 13:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.