How could wp-query be used to show posts month by month, and have it only show the past year? Or is it possible some wp_archive hack could handle this?
3 Answers
WordPress 3.7 introduced the date_query
to display posts month by month:
$args = array(
'date_query' => array(
array(
'month' => $month
)
)
);
$query = new WP_Query( $args );
Note : $month refers to month number (1-12)