Inspiration For Creative Minds
Home » Labs » WordPress code to display posts published between two particular dates  

Filed under Labs

Here is a WordPress code to show postes between two particular dates.Just before the loop starts, paste the following code. Change the dates on line 3 according to your needs.

  function filter_where($where = '') {
        $where .= " AND post_date >= '2012-02-01' AND post_date <= '2012-02-25'";
    return $where;
add_filter('posts_where', 'filter_where');
It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook

Posts you may like: