Added Date Filter To Popular Posts Query
For creating a date filter you can use // Create a new filtering function that will add our where clause to the query function filter_where( $where=”” ) { // posts in the last 7 days $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘-7 days’)) . “‘”; return $where; } add_filter( ‘posts_where’, ‘filter_where’ ); … Read more