I have created an archive page.. where i wanted to display which archive month is displaying.. how can I display the month name?

link|improve this question

40% accept rate
feedback

1 Answer

To display the Month, place this in your template where you want the date to show:

<?php the_date('F m'); ?>

That will show the full month name and the day. If you just want an abbreviation of the month like Aug. you would use:

<?php the_date('M.'); ?>

Place in front of <?php the_the_permalink(); ?>

Here's a complete example using it with the title:

<h2><?php the_date('M.'); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.