WordPress.org

Ready to get started?Download WordPress

Forums

Trouble with page-name equalling permalink-base (6 posts)

  1. ArveSystad
    Member
    Posted 8 years ago #

    I have a permalink structure on my under-development blog which looks like this:

    /archive/%year%/%monthnum%/%day%/%postname%

    The idea behind it is ofcourse that you can remove the different parts one by one, and moving "upwards" in the hierarchy levels like this:
    Post => Day => Month => year => Archive (which is an overview of the entire archive)

    My way of solving this is by having that permalink-structure, and having a page called archive, so its adress is myhomepage.com/archive/.

    The whole thing works fine down to when i only pass on a year-parameter in the adress, for instance myhomepage.com/archive/2006/. This only leads me to the /archive/-page, and not the actual 2006-archives as it should.

    Is there some way of making this work as I want, making /archive/2006/ lead to archive.php instead of my custom page-template?

  2. moshu
    Member
    Posted 8 years ago #

    Change the title/slug of the Page.

  3. ArveSystad
    Member
    Posted 8 years ago #

    I know i can change the title of the page, but then the whole point by having that IRI-structure would go away :-\

  4. moshu
    Member
    Posted 8 years ago #

    Not entirely true.
    The permalinks structure you just described, when displayed is using the archive.php template file (regardless of what the first word is there, "archive" or "moshu" ;)
    - while the Page template is archives.php and serves a totally different goal.

    So what you said about the "structure going away"... doesn't really make sense.

  5. ArveSystad
    Member
    Posted 8 years ago #

    The point is that i want the permalink-base-name to be "archive", and i want the main-archive-page to have the same name, so you can just remove part by part in the IRI to end up in the archive, as a hierarchy.

    I know archives.php and archive.php serves two different roles, but as of my link-structure it makes sense to arrive at archives.php when you remove everything but /archive/. Then add a year, a month, a day to get archives for that exact date, and it uses archive.php.

    So i want
    /archive/ to point to archives.php, as it does.

    And i want
    /archive/yyyy/mm/dd/
    /archive/yyyy/mm/
    /archive/yyyy/
    To point to archive.php, but only the two first does. I want /archive/yyyy/ to point to archive.php too, but cant seem to get that working :(

    Prolly need to toy with .htaccess a bit, i just dont know what to do with it. If someone could help me out on this one that'd be lovely :)

  6. ArveSystad
    Member
    Posted 8 years ago #

    No-one has a good answer to this issue? Sorry for bumping the post, but I really need this to work ;-)

    The page is close to finished now, but i just cant get

    /archive/yyyy/ to point to the actual yearly archives :\

Topic Closed

This topic has been closed to new replies.

About this Topic