WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Display second post (order by date) (3 posts)

  1. klevismiho
    Member
    Posted 2 years ago #

    To display the latest post, I use this:
    WP_Query( array ( 'orderby' => 'date', 'order' => 'DESC', 'showposts'=>'1' ) );

    How can I get the second post? The third, and so on?

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    try to work with the 'offset' parameter:

    http://codex.wordpress.org/Class_Reference/WP_Query#Offset_Parameter

    (caveat: does not work together with pagination)

  3. klevismiho
    Member
    Posted 2 years ago #

    Yes exactly, thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic