I am building a feed page for what is basically an online newsletter. What I'd like is to show the posts in the feed by month, displaying only the current month's info.
I am having no problem building the feed to display the posts, but can't find where to set the date information for the layout.
Here's my current loop.
$today = getdate();
$args = array( 'numberposts' =>15 , 'category_name' => 'news' , 'post_date' = '$today');
$lastposts = get_posts( $args );
foreach($lastposts as $post) : setup_postdata($post); ?>
<?php the_title(); ?>
<?php endforeach; ?>
I am trying to use $getdate(); to find the current month but didn't see any options in the WP Codex to add the results of that to my array.
Additionally, I'd like to add links on the bottom of the page where the user can select a month, and it would then rebuild the feed changing the variable to the selected month.