To exclude posts, using the WordPress Default theme for example, in the wp-content/themes/default/index.php file, just before the line:
<?php if (have_posts()) : ?>
put this:
<?php
function filter_where($where = '') {
//retrieve posts dated Jan 1, 2006 and newer
$where .= " AND post_date >= '2006-01-01'";
return $where;
}
add_filter('posts_where', 'filter_where');
query_posts($query_string);
?>
The query_posts() article explains the arguments in detail.
Related:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
Thread Starter
chen
(@chen)
Hi Michael,
thank you so much!!!! it works! 🙂
thanks again really..
more power!