WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a quick and easy way to load all the posts, starting with the second post and making the first post the last post? If I use offset, I then lose the first post, but I don't want to lose it, I just want to change the sort order, ie. first becomes last and second becomes first post.

Thanks for your help.

share|improve this question
Is this to work with pagination or not? And if so, does the first becomes last on each page, or does the first post of the first page become the very last post of the last page? – Stephen Harris Aug 24 '12 at 10:53
pagination is not necessary, thanks – uknowit2 Aug 25 '12 at 14:32

With pagination is easy :) -just retrieve all the posts, then skip the first one out. At the end rewind back to the beginning of the loop and output the post you missed out.

if( have_posts() ):

    while( have_posts() ): the_post();
         if( 0 == $wp_query->$current_post )

         // Display all but the first post


    //Rewind to the beginning

    //Display first post

share|improve this answer

Your Answer


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.