In WordPress, an archive is a collection or group of published posts that have something in common.
WordPress automatically creates archive pages based on categories, tags, and dates. Users can click on a category, tag, or date to discover related posts, making it convenient for them to explore specific content areas.
Archives help keep your WordPress website organized and accessible for both users and search engines, improving user engagement and SEO. You can customize the archive appearance and layout using themes and plugins or by editing code.
Note: This glossary entry is about WordPress archive pages. If you are looking to archive old posts, then please see our guide on how to archive posts without deleting them in WordPress.
What Are WordPress Archives?
A WordPress archive is a page automatically generated by WordPress that lists related posts. These may be posts in the same category, written by the same author, published around the same time, or more.
The easiest way to view an archive page is to click on a category, date, or author link. You will find links to category and author archives under the post title, and you can also add WordPress archives to your sidebar.
After clicking the link, you will be shown a list of relevant posts.
For example, here is an archive page on our demo website shown after clicking on the author, John Smith. It lists all posts written by this author, with the most recent posts at the top.
On WordPress archive pages, you can show the full post or just an excerpt.
What Are the Different Types of WordPress Archives?
Understanding the different archive types can help you effectively manage your content and provide a more engaging user experience.
Here are the different types of archives that are available in WordPress:
Category Archives
Category archives group your content by their assigned categories, such as travel, recipes, or tutorials. This lets your users explore more content about the topics they are interested in.
Category archive URLs use the category slug and look like this:
https://example.com/category/travel/
Here is an example of a category archive from our demo website:
Tag Archives
Tag archives are similar, but group your content by assigned tags.
They have URLs that use the tag slug like this:
https://example.com/tag/winter/
Date Archives
Date archives let you display your posts grouped by the year or month they were published. This archive is useful for blogs where users may want to explore content published in a certain timeframe.
Date archive URLs that look like this display the posts written in a certain month:
https://example.com/2024/01/
Date archives that display a certain year have URLs that look like this:
https://example.com/2024/
Here is an example of a date archive that displays all posts published in a certain month:
Author Archives
Author archives group your posts by author. This lets your users explore content written by their favorite author.
Author archives have URLs that include the author slug like this:
https://example.com/author/johnsmith/
Custom Post Type Archives
Custom post types archives are useful if you create custom post types for your website, such as movie reviews, products, or events.
Custom post type archives use the custom post slug and typically look like this:
https://example.com/custom-post-type-slug/
How to Make Archives Easier to Find in WordPress
If you want to make it easier for visitors to find archives on your WordPress website, then you can add them to your navigation menu or display them in your sidebar.
To add a specific archive to your menu, you simply need to add the archive’s URL. You can learn how in our guide on how to add post type archives in WordPress navigation menus.
Alternatively, you can add them to a block in your WordPress sidebar.
In our guide on how to customize the display of WordPress archives in your sidebar, we show you how to create compact archives, archives in a collapsible outline, limit the number of months displayed, and more.
How to Customize Archives Without Code in WordPress
You may like to customize your website’s archive pages to meet your needs.
For example, we use a custom archives page on WPBeginner that features a button leading users to our WPBeginner Guide collection.
We also organize all our blog posts into years and months so that readers can easily see what articles are published in a certain period.
If you are using a block theme, then you can customize your own archive pages by creating or editing a template using the full site editor.
Otherwise, you can create a new archive page without code using a drag-and-drop page builder like SeedProd. This is the best method if you want to create a completely custom archive page that works with any theme.
We cover both of these methods in our guide on how to create a custom archives page in WordPress.
However, if you are familiar with code, then you may want to manually edit the code in your theme’s archive template files.
How to Edit Archive Template Files in WordPress
If you are familiar with code, then you can customize your archive page by editing code in your theme’s template files.
Note: Editing WordPress theme templates can be dangerous and cause major errors on your site. We only recommend this method for advanced users.
First, you need to understand the WordPress template hierarchy. This will help you know which file you need to edit.
All WordPress themes have archive.php
, single.php
, and other files to display particular areas of your WordPress website. For example, single.php
is used to display single posts and the page.php
template is used to display a single page.
We give you practical advice on knowing the right file to edit in our guide on how to find which files to edit in your WordPress theme.
After that, you can customize the template by carefully editing its code.
You will find helpful code examples in these guides:
- How to Create Category Templates in WordPress
- How to Create a Custom Post Types Archive Page in WordPress
We hope this article helped you learn more about archives in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Additional Reading
- How to Create Category Templates in WordPress (4 Methods)
- How to Create a Custom Post Types Archive Page in WordPress
- Full Post vs Summary (Excerpt) in WordPress Archive Pages?
- How to Add Post Type Archive in WordPress Navigation Menus
- How to Find Which Files to Edit in WordPress Theme
- How to Create a Custom Archives Page in WordPress
- How to Customize the Display of WordPress Archives in Your Sidebar
- Beginner’s Guide to WordPress Template Hierarchy (Cheat Sheet)