Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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.