i have 3 section on blog post bylastweek,bylastmonth,byyear and each have loadmore,but here when i apply loadmore it works fine with year and month but
shows wrong post on last week and it shows all posting
There is working fine this month shortcode
<?php echo do_shortcode('[ajax_load_more orderby="post_views" year="'. date( 'Y' ).'" month="'. date( 'm' ).'" post_type="post" posts_per_page="12" scroll="false" button_label="SEE MORE, THERE ARE STILL A LOT" button_loading_label="SEE MORE, THERE ARE STILL A LOT"]'); ?>
but when I used it for this week shortcode it display all posts,
shortcode is below
echo do_shortcode('[ajax_load_more orderby="post_views" post_type="post" posts_per_page="12" w="'.date('W').'" scroll="false" button_label="SEE MORE, THERE ARE STILL A LOT" button_loading_label="SEE MORE, THERE ARE STILL A LOT"]');
normal query of week is working fine, please see below
$query = new WP_Query( array('orderby' => 'post_views','posts_per_page' => 12,'w' => date('W'),'paged'=>$my_page) );