This course will be retired on July 6, 2019.
Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Archive Templates in WordPress1:24 with Zac Gordon
In this introductory video we talk about the different types of archive pages you can have as well as the what files are used for the different archive types.
Archive templates are super helpful templates when building themes,
because a single archive template can work for a range of different purposes.
Not just for blog post archives by dates, but also by categories as well.
The archive templates even work for custom post types.
But we're gonna look at custom post types in a later stage.
For all archive pages, archive.php serves as the catch all, fallback template.
However, we can do a lot of customization based on dates or
categories by using the other archive templates available.
If we take a look again at the breakdown for the category archive templates.
We can see that they are broken down by author based templates, category,
custom post type, custom taxonomy, date and tag.
So, for each one of these, we have a core main template.
And then, for some of them we have more specific templates based on the term,
slug, or ID of what we're trying to identify.
Then the archive.php acts as the backup file for all of these.
You need to sign up for Treehouse in order to download course files.Sign up