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 an argument to define how many posts ago will be displayed in "recent" posts. Could I add something to this and define a specific number of posts ago to start the loop?

$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );

So for example I have a page of archives with their excerpts for the last 5 posts. In the sidebar I would like to show other posts from that category, starting with 6 posts ago.

share|improve this question
up vote 1 down vote accepted

wp_get_recent_posts basically uses WP_Query, so you can use the offset parameter.

So something like,

$args = array( 'numberposts' => '5', 'offset' => 5 ); 

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

share|improve this answer
great! thank you :) – zac Aug 7 '11 at 5:07

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.