Ok, I have a client that wants to only display posts by the current month. I've tried a few different variations but none have worked. Here's where I'm at now. Any help is appreciated!
<?php $current_year = date('Y'); $current_month = date('m'); $args = array( 'year' => $current_year, 'monthnum' => $current_month ); $custom_query = new WP_Query('$args'); if ($custom_query->have_posts()) : while ($custom_query->have_posts()) : $custom_query->the_post(); // The following determines what the post format is and shows the correct file accordingly $format = get_post_format(); get_template_part( 'includes/post-formats/'.$format ); if($format == '') get_template_part( 'includes/post-formats/standard' ); endwhile; else: ?>