• Resolved solus71

    (@solus71)


    Hello,
    I am trying to add a link in the loop that will show archive for the particular month. Is there any way to fetch the month and year from the current post and show the link?

    It would look something like this

    Blog Title
    Date: April 5, 2008 (Read posts from April 2008)

    Or even the postbypost will work if I can control the time frame somehow.

    Please help! Thank you in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter solus71

    (@solus71)

    OK, this is probably not the best approach, but I got what I was after.
    I am using this in single.php in the loop.

    <a href="/yourWPpath/?m=<?php the_time('Y'); ?>
    <?php the_time('m'); ?>"><?php the_time('F (Y)') ?> Archive</a>

    This gives me

    April (2008) Archive

Viewing 1 replies (of 1 total)
  • The topic ‘wp_get_archives based on post date’ is closed to new replies.