WordPress.org

Ready to get started?Download WordPress

Forums

archive.php and archives.php (4 posts)

  1. pauxcore
    Member
    Posted 5 years ago #

    whats the difference between the 2 file?

    what should i put in archive.php and what should i put in archives.php

  2. whooami
    Member
    Posted 5 years ago #

    Look at the default theme. It uses both.

  3. jberghem
    Member
    Posted 5 years ago #

    Yes, the default theme uses both, yet you need to be WP smart to figure out what they are for.

    The archive.php is in the template hierarchy as explained in the Template Hierarchy article in the Doc section.

    The archives.php is a custom template file which isn't used unless you select it under the page template option when you create a new Page. The fact that it just happens to be called archives.php is of no consequence. You could rename the file to diddlysquat.php and it wouldn't change anything. However the absence of archive.php would default back to the index.php when an archive is called on by the server.

  4. pauxcore
    Member
    Posted 5 years ago #

    now i know what the difference between the two file. tnx jberghem

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.