WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example, if the post was published on may 5th 2011, then clicking on "May 5th, 2011" would show all posts published in May 2011. How can that be done?

share|improve this question
up vote 1 down vote accepted

This is straight from the WordPress codex

<?php $arc_year = get_the_time('Y'); ?>
<?php $arc_month = get_the_time('m'); ?>

<a href="<?php echo get_month_link($arc_year, $arc_month); ?>">archive for <?php the_time('F Y'); ?></a>
share|improve this answer
Thanks, exactly what I needed! – trusktr May 29 '11 at 6:00
@trusktr no problem, good luck – VicePrez May 29 '11 at 6:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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