Archive Page hierarchy

This path is divided into six sub-types, and WordPress will use one of these sub-types for any given request with a collection of post data. Let's consider the following diagram for the Archive Page's hierarchy:

We use the archive.php file as the main template in this path. It's an optional file for a theme, with the index.php file handling the archives when this template is missing in a theme. However, almost all of these themes will include the archive.php file for handling the collection of data. Let's take a look at the various types of Archive Pages, starting with Author Archive.

Get WordPress Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.