Forums

Date format for wp_get_archives (3 posts)

  1. deadlove
    Member
    Posted 2 years ago #

    How can I set the date format for wp_get_archives? For example, instead of having it display "F Y" ("November 2009") I'd like to have it set to "M Y" ("Nov 2009"). I'm using the Redoable theme and it has this line in sidebar.php:

    <?php wp_get_archives('type=monthly'); ?>

    Is there any way of doing this? Thanks for any help you may be able to offer!!

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    that should be in your archive.php no?

    guess it depends on your theme as to what template is used

    in my theme it looks like this in there

    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>

    that's where to change it.....
    (there are different lines of code for daily/yearly/monthly/etc....)

  3. Justin Tadlock
    Member
    Posted 2 years ago #

    You could filter get_archives_link. Other than that, set it in your admin settings.

Topic Closed

This topic has been closed to new replies.

About this Topic