What's WP
Our everything is about WordPress - best choice of WordPress users!
How to Create a WordPress Archive Page

How to Create a WordPress Archive Page

Generally, every website or personal blog has a specific sidebar area used to display previous articles so that readers can know clearly what you have written a few days before and check out your content easily. However, this section can only display a small fraction of all your outputs, let’s say 8 posts or 10 posts, if you have created a lot of articles for the website. In this case, how can readers find your old content?

To deal with this situation, a WordPress archive page needs to come into play. This is a single page containing the links directed to all your posts, allowing visitors to browse your website through a specific gateway.

In the following, we have introduced a detailed tutorial concerning about how to create such a powerful webpage. It is not a difficult task. Even beginners can finish it after checking out the guidance.

Create an Archive Page

First of all, you need to create a separate webpage from your WordPress admin panel, and then assign it as an archive page.

Simply go for the left sidebar of the admin panel and find the Pages category. Click the Add New button to create a new page for archive.

create archive page

You can name this page whatever you like, but we still recommend you giving a suitable title like Archive Page. After all, a standard name can make it easy for you to manage, change, and customize the webpage.

Create an Archive Template

Now, you need a simple template for your archive page. The default theme of WordPress version 3.0 and beyond has already included this template. If you fail to find it in the directory of your theme, you have to create one manually.

To do this, you can open up a new file that needs to be named as archives.php, and upload it into your WordPress folder. Then, add the lines of code listed in the following and save the file. In order to match the design of your current theme, you’d better adapt the HTML structure and copy the code of your page.php file into this file.

archive code

Put the Template into Archive Page

Now, you need to go back to your WordPress dashboard. In your newly-built archive page, there is an option called Page Attributes that has been located at the right of the whole screen. After finding the right place, click the dropdown menu and choose Archive as the template. Then, simply save the setting and publish the page.

archive template

Advanced Options

If you want to display your posts in a different way but not only the general monthly listing, you can make use of the wp_get_archives template tag. See the codes needed in the following.

Display archives alphabetically

display archives alphabetically code

Display archives yearly

display archives yearly code

Display archives monthly

display archives monthly code

Display archives daily

display archives daily code

In case there are a lot of authors writing posts for your site, you can also add an author archive by adding the following line of code into the archives.php file.

author archive

Of course, you can also use some user-friendly WordPress plugins to do this task for you, such as Clean My Archives, Compact Archives, and Archives. Simply download and install one of them in your site, and then things can be down within minutes after successful activation.

Author

Susan Rose is a freelance writer who has a deep knowledge about WordPress. She loves everything related to website building since the freshman year at Christopher Newport University, and loves to share her experience with people all over all the world. This girl is popular among our readers as she is outgoing and energetic. In the daily life, Susan loves detective novels as it can train her logical thinking and creativity.

Close

Want to Learn More About WordPress?

Get Our Free Themes, Plugins, Support, SEO Tips, and Other Tutorials!

Email *