Ok I re-read the page you linked to and i overlooked what was plain to see. but now i have another problem.
this is the code;
<?php
//based on Austin Matzko's code from wp-hackers email list
function filter_where($where = '') {
//posts in the last 30 days
$where .= " AND post_date > '" . date('Y-m-d', strtotime('-14 days')) . "'";
//posts 30 to 60 days old
//$where .= " AND post_date >= '" . date('Y-m-d', strtotime('-60 days')) . "'" . " AND post_date <= '" . date('Y-m-d', strtotime('-30 days')) . "'";
//posts for March 1 to March 15, 2009
//$where .= " AND post_date >= '2009-03-01' AND post_date < '2009-03-16'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
?>
when i limit the posts to display the last 14 days this also effects the “recent posts” widget. I have the widget to display the last 5 posts but the list stops after the 14 day cut off.
How can i have the time limit on the Homepage Main Section Only, not effecting the widgets and other pages.
Thanks
Steven