How to Easily Create a Unique WordPress Category Archive page

How to Easily Create a Unique WordPress Category Archive page
December 11, 2016 Online Web Idea
How to Easily Create a Unique Wordpress Category Archive page

Archive template locates in wp-content > themes > your theme. Most of the WordPress themes don’t provide you custom archive page template, some themes provide you only a single archive page template. But you can create unique archive page template to further customize and add your code and content.

If you don’t want to show the same page design of all the WordPress archives, then you can easily create some custom archive page template for each WordPress archives.

The idea behind creating new archive page template is to give site administrator and WordPress coder a great way to showcase the archive based on various criteria. The benefit of creating custom archive page template is that you can change designing, coding, and functionality of each archive.

Custom archive page allows you to list your:-

  • Monthly Archives
  • Category Archives
  • Tag Archives
  • Author Archives
  • And anything else you want to add.

 

Creating Category page template

Go to wp-content > themes > your theme, you will see a file named “archive.php”.

Now find “category.php” in the same location. If you find one, congrats! Your theme provides you category page template. But if you don’t find “category.php” file here, then you can create a new one. And you can start customizing the file according to your requirement.

archive and category

After creating the new category page template you can add your code to this file. Whatever code you added here in this file you will see its results on WordPress category archive showcase page. The quick and easy ways are to just copy the code from existing archive page template into your newly created category archive page.

You can add some comments lines in your category.php page Archive to make sure that you’re newly created category archive page is working fine.

Like just add this to be fully sure: – “My Category Archive Page, This Line Should Shows to all My WordPress Categories.

 

Wordpress category archive11

After saving the file, here is the Output:-

Wordpress category archive2

 

But I Want to Separate Only One Category

Let’s say you have a special category “Travel” and you want to assign a unique category page archive for this particular category only. Then you have to create a new category page archive named “category-travel.php”.

You need to create “category-travel.php” file in the same location where you found the archive.php file. Now you can add your code and customize the travel category page template according to your need.

You can add or delete functions; you can add some unique and different stylesheet codes, different HTML codes. Whatever you do here in this template it will reflect as on only travel category page.

 

What about tags and other WordPress Categories

Just like we did for WordPress post categories, you can do the same for all other archives like tags, author, monthly archives etc. if you want to show unique tag archive design then just create a unique tag archive page and add your code. If you want to show unique author archive page then create a new author archive template.

In the end, all depends on practice; you can practice this tutorial using some different themes. You can start this by creating unique tag or author archive template.

 

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*