WordPress.org

Support

Support » How-To and Troubleshooting » Yearly archive using index.php instead of archive.php

Yearly archive using index.php instead of archive.php

  • Hey, Well the title says it all, I have made a custon archives page (archives.php) that lists months and years, all the monthly archives work, and use the archive.php page. the Yearly archives.. use the index.php template… which is a huge problem for me.

    I havnt done anything radical to my system and unless the wordpress template hierarcy has changed the yearly archive should use archive.php if it is present and not jump the gun to index.php?

    Can anyone help? i cant seem to find anything on the subject.

Viewing 5 replies - 1 through 5 (of 5 total)
  • MichaelH

    @michaelh

    Note: archives.php is not the same as archive.php.

    Template_Hierarchy#Date_display says it should use archive.php.

    What happens if you change themes? Also, is there a plugin causing that?

    I’m having a similar (if not, the same) problem.

    I’ve created an ‘archive.php’ template, but when I link to a category, it’s still using ‘index.php’.

    I have no additional plug-ins activated.

    When I switch themes to the WP Default, it seems to work properly. But I’ve developed quite a few themes before this and have never encountered the problem.

    Any insight would be helpful. Thanks.

    More info:

    using the category id (ie, ‘?cat=7’) brings up the ‘archive.php’ file but will not display The Loop.

    using the category slug (ie, ‘?cat=featured’) will display the loop, but it brings up the ‘index.php’ file.

    Have you tried to just “re-save” you permalink structure (admin / permalinks)?

    Just tried it.. no luck. Same problem.

    Although I’m not also discovering more problems that are suspicious of being rooted in the same general issue.

    The ‘single.php’ template brings up a loop all of the posts in the category that queried post belongs in.

    This is very frustrating and i’m starting to think i need to rebuild this theme from the ground up….

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Yearly archive using index.php instead of archive.php’ is closed to new replies.