

How to Create a Custom Archive template in WordPress -:
Create the first one-page template to add custom WordPress archive to your site. save it as Archive.php
<?php
/*
Template Name: Archives
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<?php the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php get_search_form(); ?>
<h2>Archives by Month:</h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h2>Archives by Subject:</h2>
<ul>
<?php wp_list_categories(); ?>
</ul>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Then upload it into your current theme folder (wp-content >> themes >> your current theme).Now, this Custom WordPress Archive Page will add the following things to your site.
Search Form
Archives By Month
Archives By Category
How to create a WordPress Custom Archive Page-:
After you complete the above process, simply click on page >> Add new option and select Archives from the template drop-down menu in the Page Attributes section. You don’t need to add anything to this empty page. Now click the preview button to publish your page or check it. Congratulations, you have successfully created the WordPress archive page in your site. You can comment for any questions related to this article.
Conclusion-: Custom Archives page is one of the best way to show Search form, Show old content, Archive by month or category. I allow you to have a dedicated page.
If you like my work, Please Share on Social Media! You can Follow WP knol on Facebook, Twitter, Pinterest and Quora for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.