Support » Fixing WordPress » Year archive pulling up archives.php page

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Nick Momrik

    (@mtdewvirus)

    I delete the “archives page” in my admin, but leaft archives.php in the theme. When I do this, year archives work as they should by using archive.php.

    Very odd and confusing…

    Thread Starter Nick Momrik

    (@mtdewvirus)

    Found it!

    Since I had a “page” with a slug of “archives”, this is part of the rewrite code that was generated for it.

    RewriteRule ^(archives)/?([0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]

    So anything with “archives/#####/” (any number of digits 0-9 where those # symbols are) was being directed to use the “archives page”.

    Guess I won’t be letting WP manage my .htaccess file. :-/

    jimtkm

    (@jimtkm)

    So how u fix it? I’m having the same problem too, mind tell me? Thanks

    Thread Starter Nick Momrik

    (@mtdewvirus)

    Change this rule…
    RewriteRule ^(archives)/?([0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
    to this…
    RewriteRule ^(archives)/?$ /index.php?pagename=$1 [QSA,L]

    lawtai

    (@lawtai)

    If you’re to change this and then let WP go back to handling the .htaccess file, it’ll just rewrite your changes right? Cause it’s really a ton easier to let WP just handle the file instead of manually updating it when you add a new page.

    Thread Starter Nick Momrik

    (@mtdewvirus)

    Yes, if you let WP handle .htaccess, it’s going to keep adding the rules back in.

    I too have tried testing it for my blog but it gives it for only a month and not for a year. Can any of u guide me over it. Like how to make changes in Archive.php and make it running

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Year archive pulling up archives.php page’ is closed to new replies.