WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Archive.php & Archive(s).php (4 posts)

  1. t31os
    Member
    Posted 6 years ago #

    Can someone please explain the purpose of both these files.

    Why 2 seperate files, what does one handle that the other doesn't. Just need a clear cut answer since the Codex isn't quite cutting it, nor my google efforts.

  2. Len
    Member
    Posted 6 years ago #

    Hi t31os,

    archive.php --> Is an archive template WordPress uses to display data when a category, author, or date is queried. This template is overridden by category.php, author.php, and date.php according to the Template Hierarchy. Take a look at Theme Development and scroll down to Theme Template Files List.

    archives.php --> Is a custom Page Template created by you (if it was not already created by your theme's author) that can be used to showcase your archived material. Typically it would contain a list of links organized in whatever manner you specify. For instance, the one I created for my theme lists my archives by date and topic. Think of it as a gateway page.

    By the way, nice tut --> tabbed sidebar

  3. t31os
    Member
    Posted 6 years ago #

    This pic is all i needed...
    http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

    from the link you posted..
    http://codex.wordpress.org/Templates_Hierarchy

    If i had found that i would have never asked....

    I'm a really visual person so seeing it in image form totally clears up my understanding...

    Of course your explaination helps a great deal to.. :-)

    Thanks for the links... just what i needed...

    If you like the tut, feel free to post a link to it, or whatever the fancy blog method is for mirroring wordpress articles... "I'm still a blog noobie per say" ... but i know my code alright.. :) i like playing with code...

  4. QuBic
    Member
    Posted 6 years ago #

    LenK, you just answered the question I came here to ask - thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.