To display the most popular posts based on page views I am using this code (source):
<?php
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC');
if (have_posts()) : while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
endwhile; endif;
wp_reset_query();
?>
I would like to restrict the query to return posts from a certin date (i.e. the last seven days) and I am unsure how I would achieve this.
query_posts()
.