Please follow the step
write the following code just above
while ( have_posts() ) : the_post();
loop
$name = explode('/',$_SERVER['REQUEST_URI']);
$year = $name[1];
$month = $name[2];
$args = array(
'posts_per_page' => -1,
'year' => $year,
'monthnum' => $month,
'order' => 'ASC'
);
query_posts( $args );
Function Used to get splitted URL
$name = explode('/',$_SERVER['REQUEST_URI']);
No comments:
Post a Comment