exclude last X days posts from query
-
I’m looking for a way to exclude posts from last X days from a query_posts. I’m using the following code for the homepage to pull posts only from the 3day range and looking for a way to build an archive starting with 3+ days posts, excluding the homepage ones.
query_posts($args); while ( have_posts() ) : the_post(); $mylimit=2 * 86400; //days * seconds per day $post_age = date('U') - get_post_time('U'); if ($post_age < $mylimit) {
- The topic ‘exclude last X days posts from query’ is closed to new replies.