Please i am trying to get top post by views in last 3 day's

// Top post by views in last 3 day's
<ul>
    <?php
    function filter_where($where = '') {
        $where .= " AND post_date > '" . date('Y-m-d', strtotime('-3 days')) . "'";
        return $where;
    }
    add_filter('posts_where', 'filter_where');
    query_posts('post_type=post&posts_per_page=5&orderby=post_views_count&order=DESC');
    while (have_posts()): the_post(); ?>
        <li><a href="<?php the_permalink(); ?>" title="<?php printf(esc_attr('Permalink to %s'), the_title_attribute('echo=0')); ?>" rel="bookmark"><?php the_title(); ?></a></li>
        <?php
    endwhile;
    wp_reset_query();
    ?>
</ul>


</ul> 
Sponsor our Newsletter | Privacy Policy | Terms of Service