i want to implement
// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
// posts for March 1 to March 15, 2010
$where .= " AND post_date >= '2010-03-01' AND post_date < '2010-03-16'";
return $where;
}
add_filter( 'posts_where', 'filter_where' );
$query = new WP_Query( $query_string );
remove_filter( 'posts_where', 'filter_where' );
`
but in an array funtion like
year => $current
month => $funtion (last 11 months)
Thanks
Maybe look at the time/date functions in PHP –
$from_date = date('m')-335;
I beleive will give you the month number from (aprox) 11 months ago.
@duck__boy Thanks
But how can i put this under an array?