Creating an Archives page for your WordPress website is a great way to arrange and bring together all your content on a dedicated page. You can easily create an Archives page for WordPress website. In this article, I’ll explain how to create an Archives page for WordPress website easily.
What is WordPress Archives Page?
Archives Page is a collection of your blog posts, where you can list your posts by category, tags, author, year and month wise.
Why we need An Archives Page for WordPress Website?
Archives Page is like an index page of your website. Archives Page helps to bring together all your content on a dedicated page and helps a user to easily find any post by category, tag and author.
A user can find any post using the search form on your website. To extend this feature and to find any post by category, tag and author, every website needs to have an Archives Page.
Let’s check how to create an Archives Page for WordPress Website.
How to Create an Archives Page for WordPress Website?
The first thing you need to do is creating a page template for Archives Page. But before creating a page template for Archives Page, we need to check whether your current theme is having an Archives Page template. This will help you to decide whether we need to create an Archives Page template or simply using the existing one.
Check if your current theme is having an Archives Page template:
Login to your WordPress dashboard and create a new page. In the right-hand side of the post editor screen, you’ll see a Meta box called page attributes. Most WordPress themes come with custom page templates to change the look for static pages. This allows you to assign the custom page templates for any page.
If your current theme is having an Archives Page template, you’ll find an Archives template from the drop-down list under Template.
If your activated theme is having an Archives Page template, we can proceed to create an Archives Page for your WordPress website otherwise we need to create an Archives Page template.
Creating a WordPress Archives Page template:
If your current theme is having an Archives Page template, you can skip this step. Don’t worry if your theme doesn’t have archives page template and follow these simple steps to create easily.
Simply create a notepad and name it as an archives.php or page-archives.php and add the below code.
<?php /* Template Name: Archives */ get_header(); ?> <div id="container"> <div id="content" role="main"> <?php the_post(); ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php get_search_form(); ?> <h2>Monthly:</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <h2> Categories:</h2> <ul> <?php wp_list_categories(); ?> </ul> <h2> Authors:</h2> <ul> <?php wp_list_authors (); ?> </ul> <h2> Pages:</h2> <ul> <?php wp_list_pages (); ?> </ul> </div><!-- #content --> </div><!-- #container --> <?php get_sidebar(); ?> <?php get_footer(); ?>
You can also use WordPress template tags to customize Archives Page template.
Publish Archives Page:
Once you created the Archives Page template, go to Settings >> Pages and click on add new to create a new page and name it as Archives.
Under page attributes, choose Archives as your page template from the drop-down box under templates. Add a small description in the content area and hit publish.
That’s it. You’ve successfully created an Archives Page for your WordPress Website. This will display your blog archives which help your users to dig deeper into your old content easily.
You can check the Royalecash Archives page here.
We hope this article helped you in creating an Archives Page for WordPress Website.
If you’ve any questions, feel free to contact me and share this post with your friends on Facebook, Twitter and Google +.
Leave a Reply