WordPress generates an archive page for every category created

Hire a WordPress Expert on Codeable
Updated On: January 14th, 2025 0 Comments

Whenever you create a category, WordPress automatically generates an archive page for it.

And inside this archive page, WordPress displays all the posts assigned to a particular category.

This archive page is for website visitors and search engines.

Search engines index these archive pages automatically as they crawl through other parts of the website.

Come on, let’s view a category’s archive page to understand this clearly.

💡
Whenever you create a tag, WordPress automatically generates an archive page for it. So, the knowledge in this lesson applies to the “tags” as well.

0:00

/

First, go to the “Categories” screen.

Next, hover your cursor over a particular category and click the “View” link. It will take us to the associated archive page on the frontend.

Tada! That’s an archive page.

As you can see, the archive page looks pretty similar to the website’s Homepage, but it only displays blog posts belonging to a particular category.

In my case, I see blog posts assigned to the “Invoicing” category.

Frankly speaking, without archive pages, there is no blog.

So, archive pages are a very important functionality that WordPress provides.

Now, let’s understand the URL structure of an archive page.

For website visitors accessing the archive page, WordPress automatically generates a URL in the following format:

https://domain-name.com/category/category-name

As you can see, the final URL is generated depending on the category name provided.

For example, if you have created a category named “Accounting”, the automatically generated URL will be:

https://criyasoft.com/category/accounting

If you have provided “Freelance Accounting” as the category name, then the generated URL will be:

https://criyasoft.com/category/freelance-accounting

Also, from a terminology perspective, the category name inside the above URL is called a “Slug”:

A category’s “Slug” is very similar to a permalink of a blog post.

Just like a permalink acts as a unique identifier in the URL of a blog post, a “Slug” acts as a unique identifier in the URL of a category page.

This is why a category’s slug is a URL-friendly version of the category name.

For example, if you have provided a category name containing space in it, WordPress will replace the space with a hyphen for the slug.

Also, Uppercase characters will get replaced with Lowercase characters.

WordPress uses these same rules for generating a permalink, right?

Next comes an important question!

How do website visitors access an archive page?

Usually, we need to add the archive page links manually to our website navigation menu.

We didn’t talk about creating menus yet, but WordPress provides an easy way to add the category archive pages as menu items.

Having said that, We can place the archive page links anywhere we want on the website.

Next, they will be outputted automatically by the active theme through the code files.

Usually, every theme adds a list of category links at the bottom of a particular blog post (for all blog posts).

And when you click on them, they will take us to respective archive pages.

This will help the website visitors to view other blog posts that belong to the same category.

Also, the appearing place of the category links depends on the theme.

It could change from theme to theme.

We will talk more about the themes later.

Another question…

Can we edit an archive page?

Unfortunately, we can not edit archive pages because WordPress generates them automatically.

Having said that, you can change the look and feel of an archive page by editing the code files inside the active theme (out of scope for this course).

Starting from the next lesson, we will start doing some exercises related to managing the categories.