WordPress code to display posts published between two particular dates

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');

Related posts:

Partner with Us

We are providing an exclusive partnership offer to individuals and companies who are interested in setting up their own web design & development company. For more information about how to partner with us, please contact us