I want to apply a class to a navigation list item when the page shown is a month archive, but not just any month, only the current month. Here's my code:
First I assemble a link to the current month archive:
<?php
$current_month = mysql2date('m', current_time('mysql'));
$current_year = mysql2date('Y', current_time('mysql'));
$issue = get_bloginfo('home') . "/" . $current_year . "/" . $current_month . "/";
?>
Next I use those variable on my list item...
<li class="page <?php if (is_month()) { echo "current_page"; } ?>">
<a href="<? echo $issue; ?>">Read The Current Issue</a>
</li>
My problem is, I need to have the conditional tag is_month() test whether it's the current month, not just any month. The reason why is because if you hit any other month archive, it's setting my navigation list item to the current page even when it's not the "current month" :-/
Hope that makes sense.