Support » Fixing WordPress » Calendar Links

  • When I changed my permalink structure to: /archives/%monthnum%/%year%/%postname%/
    I get this mod-rewrite code:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/([0-9]{1,2})?/?([0-9]{4})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?monthnum=$1&year=$2&name=$3&page=$4 [QSA]
    RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]

    This messes up my calendar, though, because it stops changing and will only reflect the current month, rather than any previous months.
    see: http://blog.rpeeck.com/archives/03/

Viewing 3 replies - 1 through 3 (of 3 total)
  • OK, i’m giving up on my permalink structure for now. if anyone is hit with inspiration, plz let me know. but, for now, i’m going back to “ugly links” 😛
    Can’t have a bunch of dead links in a production blog…

    Sorry, when I changed my format to match yours I see the same problem in the current CVS code. Looks like a bug… Ryan? 🙂

    After fiddling, I solved the problem:
    %year% must be the first variable in the permalink for the calendar to correctly work; if you move the year to another part of the permalink, the calendar (apparently) doesn’t know what year it is and/or mistakes the year for the month… or something. In any case, the following permalink structure / mod-rewrite rules solved my problem:
    /archives/%year%/%monthnum%/%day%/%postname%/
    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/?(.*) /index.php?category_name=$1 [QSA]
    A fix would be nice (in an upcoming version) so that the archives could follow (U.S.A. ?) “standard” date setup:
    ie) month/day/year
    Thx for checkin out the problem Alex, after checking out your site and permalink structure, I decided to give my fix a try, and it worked.
    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Calendar Links’ is closed to new replies.