I have created an archive page.. where i wanted to display which archive month is displaying.. how can I display the month name?
2 Answers
If you want to get the month of the current archive page you’ll have to use single_month_title
. The following code will output ” August 2014″ (notice the space before the month)
<?php single_month_title(' ') ?>
Without a space before the month:
<?php echo trim(single_month_title(' ',false)) ?>
Read more: http://codex.wordpress.org/Function_Reference/single_month_title