Hi everyone,

I'm trying to Display Popular Posts Sort by Day, Week, Month and All Time using this SNIPPET


Query to display posts by monthly
PHP Code:
<ul>
    <?php
    $month 
date('m');
    
$year date('Y');
    
query_posts('meta_key=post_views_count&orderby=meta_value_num&order=DESC&year=' $year '&monthnum=' $month);
    while (
have_posts()): the_post(); ?>

<li><a>" 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>
Query to display all time popular posts
PHP Code:
<ul>

    <?
    query_posts
('meta_key=post_views_count&orderby=meta_value_num&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>
I'm able to display the monthly and all time posts however I'm unable to display day and weekly anyone can help me with this?