Forums

[resolved] Simple question: How to display the year of an archive? (3 posts)

  1. TransPersonal
    Member
    Posted 6 months ago #

    I'm looking for something like:

    <?php echo single_cat_title(); ?>

    But the above is to display the category. What is the piece of code to display the year? Forgive me if this has already been covered but I searched the codex but couldn't find it.

  2. mmuro
    Member
    Posted 6 months ago #

    <?php the_time('Y'); ?>

  3. TransPersonal
    Member
    Posted 6 months ago #

    Thank You so much mmuro, it worked!

Reply

You must log in to post.

About this Topic