Hi Thematic friends,
I have a taxonomy called "genero". I´m trying to limit my "genero" archive page to just show future posts, like an event page.
So, I used this code:
function filter_where( $where ) {
if(is_tax('genero')){
$where .= " AND post_date > '" . date('Y-m-d', strtotime('0 days')) . "'";
}
return $where;
}
add_filter( 'posts_where', 'filter_where' );
function reset_filter_where() {
if(is_tax('genero')){
remove_filter( 'posts_where', 'filter_where' );
}
}
add_action('thematic_below_archiveloop','reset_filter_where');
It works great on the genero´s archive page, but it breaks all the other looping on other pages. I don´t know what is happening. When I say it breaks I mean I get a blank page in another archive page, for exemple! On home, where I have another 2 loops, it shows the page, the header, but the loops are empty.
Any help?
Thanks!