WordPress.org

Support

Support » How-To and Troubleshooting » Change Monthly Archives to Three Letter Representation

Change Monthly Archives to Three Letter Representation

  • So I am using get_arhives to display my archives and I am wondering if anyone knows of a way to display the archives using the 3 digit abbreviation for the month (January = Jan, February = Feb) instead of the default way (which is displaying the entire name of the month)? Thanks.

    Site can be found at http://www.davedirect.com.

Viewing 10 replies - 1 through 10 (of 10 total)
  • http://codex.wordpress.org/Formatting_Date_and_Time

    wordpress uses the same format that php, itself, uses.. therefore :

    http://us3.php.net/date

    will give you what you need.

    checking your site, youve already figured this out.. ah well, thanks for coming back and letting us all know and marking this resolved too 😛

    Uh…actually I haven’t figured this out. I do know all of that about php, but my question is how do I change it for my archives?

    aha, I follow, my apologies for not reading closer. wheres the archives page and are you using any plugin to display them?

    I am not using any plugin to display the archives. I am not sure what you mean by where’s the arhcive page. Do you mean located as in: index\wp-content\themes\mystyle\archives.php? Thanks for the help.

    Ah, you mean what is displayed as links in your sidebar?
    For that you’ll have to edit WP core files. The get_archives function is in the wp-includes/template-functions-general.php starting at line #277.

    Yeah, that is what I am trying to do. I took a look at that file, but…well…my php skills suck. Is this something that is easy to do…like changing a few small things, or is this something that is pretty complex to do?

    are you using get_archives or wp_get_archives in your theme file.

    Take a look at that file below the line number moshu suggested.. get_achives is straightforward about making changes to the date:
    // over-ride general date format ? 0 = no: use the date format set in Options, 1 = yes: over-ride
    $archive_date_format_over_ride = 0;

    // options for daily archive (only if you over-ride the general date format)
    $archive_day_date_format = 'Y/m/d';

    // options for weekly archive (only if you over-ride the general date format)
    $archive_week_start_date_format = 'Y/m/d';
    $archive_week_end_date_format = 'Y/m/d';

    Ah…I guessed right then. That is what I tried to edit, but didn’t get very far. Changing those settings did not change the format the date of my archive links. I am using get_archives, by the way.

    Hello!
    dave601, I’m also fighting with the same problem as you are. Those settings, what whooami suggested are related only for the weekly and/or daly archives, but not for the monthly, what we use.
    So, I also want to convert somehow my archive links in the sidebar to number of the month / year (eg.: 12/06).
    Has anybody an idea to solve it?

    Many thanks,
    Zsola

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change Monthly Archives to Three Letter Representation’ is closed to new replies.
Skip to toolbar