WordPress.org

Forums

Yearly archive using index.php instead of archive.php (6 posts)

  1. raquia
    Member
    Posted 5 years ago #

    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.

  2. MichaelH
    Member
    Posted 5 years ago #

    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?

  3. vopka
    Member
    Posted 5 years ago #

    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.

  4. vopka
    Member
    Posted 5 years ago #

    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.

  5. Marco Schmoecker
    Member
    Posted 5 years ago #

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

  6. vopka
    Member
    Posted 5 years ago #

    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....

Topic Closed

This topic has been closed to new replies.

About this Topic