WordPress

How to Access Archive Pages in WordPress?

Find any WordPress archive page: category, tag, author, date and post type URLs, dashboard View links, template files and block theme archive templates.

Shashank Dubey
·12 min read
Tabbed card showing WordPress archive types with a category archive URL and the title How to Access Archive Pages in WordPress

To access an archive page in WordPress, open its address in your browser: category archives live at /category/your-category/, tag archives at /tag/your-tag/, author archives at /author/username/ and date archives at /2026/11/ or /2026/. The quickest way to find the exact link is in the dashboard: go to Posts > Categories or Posts > Tags, hover over a term and click View, or go to Users and click View under an author. Which file or template draws the page is decided by the WordPress template hierarchy, and you can change it in the Site Editor on a block theme or with template files on a classic theme.

That is the short answer. The rest of this guide covers what most people get stuck on next: archive URLs when permalinks are plain, custom post types that refuse to show an archive, the “Category:” prefix in titles, posts per page, block theme templates, and the handful of mistakes that show up again and again in support forums. Our team checked every function, file name and block setting on 18 November 2026 against WordPress 7.1.4 core source, the Gutenberg repository and the developer handbook on developer.wordpress.org.

What is an archive page in WordPress?

An archive page is a list of posts that share one thing: the same category, tag, author, date, custom taxonomy term or post type. WordPress builds these pages for you. You do not create them under Pages, and you will not find them in the page list. They exist the moment there is something to list, and they disappear (with a 404) when the term or date has no published posts.

WordPress core recognises six kinds of archive:

  • Category archives: every post filed in one category, including posts in its child categories.
  • Tag archives: every post with one tag.
  • Author archives: every post written by one user.
  • Date archives: posts from a year, a month or a single day.
  • Custom taxonomy archives: posts with one term from a taxonomy a plugin or theme registered, such as a “Genre” or “Product category”.
  • Post type archives: the main list for a custom post type, such as /books/ or /events/, when the post type was registered with an archive.

Your main blog page (the “Posts page” in Settings > Reading) also lists posts, but WordPress treats it as the home of the blog, not an archive. The conditional tag for it is is_home(), while every archive type above returns true for is_archive(). That difference matters when you write code or pick a template, as you will see further down.

What are the archive page URLs in WordPress?

Archive URLs follow fixed patterns. With pretty permalinks turned on (any setting other than “Plain” in Settings > Permalinks), they look like this:

Archive type

Pretty permalink URL

Plain permalink URL

PHP function for the link

Category

/category/news/

/?cat=12

get_category_link()

Tag

/tag/php/

/?tag=php

get_tag_link()

Author

/author/jane/

/?author=3

get_author_posts_url()

Year

/2026/

/?m=2026

get_year_link()

Month

/2026/11/

/?m=202611

get_month_link()

Day

/2026/11/18/

/?m=20261118

get_day_link()

Custom taxonomy

/genre/fantasy/

/?genre=fantasy

get_term_link()

Post type

/books/

/?post_type=book

get_post_type_archive_link()

A few details in that table trip people up:

  • The author part of the URL is the user’s nicename, a URL-safe version of the login name, not the display name. A user called “Jane Doe” with the login jdoe lives at /author/jdoe/.
  • The custom taxonomy and post type examples depend on how the plugin or theme registered them. The URL uses the rewrite slug if one was set, otherwise the taxonomy or post type name.
  • Every archive also has a feed. Add feed/ to a pretty archive URL, for example /category/news/feed/, to get the RSS feed for that category only.
  • Paged archives add page/2/, so the second page of a category is /category/news/page/2/.

How do I change the category and tag base in the URL?

The words category and tag in those URLs are only defaults. In Settings > Permalinks, under “Optional”, you can set a Category base such as topics and a Tag base such as keyword. Archives then move to /topics/news/ and /keyword/php/.

Think hard before you change these on a live site. The old addresses stop working, and any links from search results, newsletters or other sites now point at a 404 unless you add redirects yourself. On a new site it is a free choice. On an established one, leave the base alone unless you have a strong reason and a redirect plan.

How do I access archive pages from the WordPress dashboard?

You rarely need to guess a URL. The dashboard has a View link for each archive type that has terms or users behind it.

  1. Category archive: go to Posts > Categories, hover over the category name in the list, and click View. The same list shows how many posts each category holds in the “Count” column.
  2. Tag archive: go to Posts > Tags, hover over the tag, and click View.
  3. Author archive: go to Users > All Users, hover over the user, and click View. WordPress builds that link with get_author_posts_url(), so it always matches your permalink settings.
  4. Custom taxonomy archive: the taxonomy has its own screen under the post type menu (for example Products > Categories in WooCommerce), with the same View link.
  5. Post type archive: there is no View link for the archive itself. Use the URL pattern from the table, or call get_post_type_archive_link() in code.
  6. Date archive: there is no screen for dates. Type the URL, or add an Archives block to your site and click a month.

If a View link opens a 404, the term may have no published posts yet. Drafts, scheduled and private posts do not count toward a public archive.

Why does my custom post type not have an archive page?

A custom post type only gets an archive when it is registered with has_archive set to true or to a slug string. The default is false, so a post type registered with just a label and public => true has single post pages but no list page. Most post type plugins have a “Has archive” setting that sets this argument for you.

If you register the post type in code, it looks like this. Checked on 18 November 2026 against the register_post_type() reference:

add_action( 'init', function () {
	register_post_type( 'book', array(
		'label'        => 'Books',
		'public'       => true,
		'has_archive'  => 'books',            // Archive lives at /books/.
		'rewrite'      => array( 'slug' => 'book' ), // Singles live at /book/title/.
		'show_in_rest' => true,               // Needed for the block editor.
		'supports'     => array( 'title', 'editor', 'thumbnail', 'excerpt' ),
	) );
} );

After you add or change has_archive or rewrite, WordPress needs to rebuild its rewrite rules. Go to Settings > Permalinks and click Save Changes without changing anything. That one click fixes most “my archive is a 404” reports. Do not call flush_rewrite_rules() on every page load: the handbook warns it is an expensive operation and belongs in a plugin activation hook.

Once the archive exists, get_post_type_archive_link( 'book' ) returns its URL, and you can add it to a menu as a custom link.

Which template file controls each archive page?

WordPress picks the template for an archive using the template hierarchy. It walks a list of file names from most specific to most general and uses the first one your theme has. If none match, it falls back to index.php (or index.html in a block theme). The order below comes straight from wp-includes/template.php and template-loader.php in WordPress 7.1.4:

Archive

Templates checked, in order

Category

category-{slug}.php, category-{id}.php, category.php, archive.php, index.php

Tag

tag-{slug}.php, tag-{id}.php, tag.php, archive.php, index.php

Author

author-{nicename}.php, author-{id}.php, author.php, archive.php, index.php

Date

date.php, archive.php, index.php

Custom taxonomy

taxonomy-{taxonomy}-{term}.php, taxonomy-{taxonomy}.php, taxonomy.php, archive.php, index.php

Post type

archive-{post_type}.php, archive.php, index.php

Two practical consequences. First, if you only want to change one category, you do not need to touch the others: create category-news.php in a child theme and only the “news” archive uses it. Second, archive.php is the shared fallback, so editing it changes every archive type that has no more specific file.

A post type archive only uses archive-{post_type}.php when the post type was registered with an archive. WordPress checks has_archive before it looks for that file, which is one more reason the setting above matters.

How do archive templates work in a block theme?

Block themes use the same hierarchy, with HTML files in the theme’s templates folder instead of PHP files: category.html, tag.html, author.html, date.html, taxonomy.html, archive-book.html, archive.html and finally index.html. You rarely edit those files by hand. You use the Site Editor.

  1. Go to Appearance > Editor > Templates.
  2. Click Add template (the plus button). WordPress lists the archive types your theme does not have yet, such as “Category Archives”, “Tag Archives”, “Author Archives”, “Date Archives” or “All Archives”.
  3. Pick one. For categories, tags and authors you can choose a template for all of them or for one specific category, tag or author, which creates the category-{slug} style template for you.
  4. Design the template, then save. The change applies site-wide right away, so test on a staging copy first if the site is busy.

Look inside the default Twenty Twenty-Five theme and you will see how little an archive template needs. Its archive.html holds a header, a Query Title block set to the archive type, a Term Description block and a Query Loop pattern, then a footer. That one file serves every category, tag, author and date archive, because the theme ships no more specific ones.

The Query Loop block is the part to watch. In an archive template it must have Inherit query from template switched on (the inherit setting, which is on by default in the block’s block.json). With it on, the loop shows the posts that belong to whatever archive the visitor opened. Switch it off and the loop runs its own fixed query, so every category page shows the same list.

Three other blocks are worth knowing on archive templates:

  • Query Title: prints the archive name. Its “Show archive type in title” toggle (the showPrefix setting) controls whether “Category:” or “Tag:” appears in front.
  • Term Description: prints the description you typed for the category or tag in the dashboard. Fill those descriptions in; an archive page with a real introduction is far more useful to readers than a bare list.
  • Query Pagination: the next and previous links. Without it, readers see only the first page of the archive.

How do I add links to archive pages so visitors can find them?

Archives are only useful if people can reach them. You have four main options, and you can mix them.

Navigation menu

In a block theme, open the header template part in the Site Editor, select the Navigation block, click the plus button, and search for a category or tag by name. It adds a link to that archive. In a classic theme, go to Appearance > Menus, open the Categories panel (turn on Tags under “Screen Options” if you need it), tick the terms and click Add to Menu. For a post type archive, use a Custom Link with the archive URL.

Archives block for date archives

The Archives block lists your date archives. Its settings let you group by year, month, week or day (month is the default), show the list as a dropdown, and show post counts. On a site with years of posts, the dropdown with yearly grouping keeps a sidebar from turning into a long column of month names.

Categories List and Tag Cloud blocks

The Categories List block shows every category with a link to its archive, optionally as a dropdown or with post counts. The Tag Cloud block does the same for tags, sized by how often each tag is used.

Classic widgets and template code

On a classic theme, the Archives and Categories widgets in Appearance > Widgets do the same job. In a template file, wp_get_archives() prints the same list. Checked on 18 November 2026 against the wp_get_archives() reference:

<nav aria-label="Archives by year">
	<ul>
		<?php
		wp_get_archives( array(
			'type'            => 'yearly',
			'show_post_count' => true,
		) );
		?>
	</ul>
</nav>

How do I get an archive URL in PHP?

Never hard-code archive URLs in a theme or plugin. Permalink settings, category bases and multilingual plugins all change them. Ask WordPress for the link instead:

// Category and tag archives (by term ID).
$news_url = get_category_link( 12 );
$php_url  = get_tag_link( 34 );

// Any taxonomy term (returns WP_Error if the term does not exist).
$genre_url = get_term_link( 'fantasy', 'genre' );
if ( is_wp_error( $genre_url ) ) {
	$genre_url = '';
}

// Author archive.
$author_url = get_author_posts_url( get_the_author_meta( 'ID' ) );

// Date archives.
$year_url  = get_year_link( 2026 );
$month_url = get_month_link( 2026, 11 );
$day_url   = get_day_link( 2026, 11, 18 );

// Post type archive (false if the post type has no archive).
$books_url = get_post_type_archive_link( 'book' );

To check which archive is being shown, use the conditional tags: is_category(), is_tag(), is_author(), is_date(), is_tax(), is_post_type_archive(), or is_archive() for any of them. Each takes an optional argument, so is_category( 'news' ) is only true on the news archive.

How do I remove “Category:” from the archive title?

Classic themes usually print the title with the_archive_title(), which adds a prefix such as “Category:”, “Tag:”, “Author:”, “Year:”, “Month:” or “Archives:”. Since WordPress 5.5 you can remove it with one filter, without rebuilding the title. Checked on 18 November 2026 against get_the_archive_title():

// In a child theme's functions.php or a small plugin.
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );

On a block theme, select the Query Title block in the archive template and switch off Show archive type in title. No code is needed.

How do I change how many posts an archive page shows?

All archives use the number in Settings > Reading > Blog pages show at most. Change it there to change every archive and the blog page together.

To change one archive type only, adjust the main query before it runs with the pre_get_posts action. This example shows 24 posts on the books archive and leaves everything else alone:

add_action( 'pre_get_posts', function ( $query ) {
	if ( is_admin() || ! $query->is_main_query() ) {
		return;
	}
	if ( $query->is_post_type_archive( 'book' ) ) {
		$query->set( 'posts_per_page', 24 );
	}
} );

Use pre_get_posts instead of running a second query with new WP_Query() inside the template. A second query breaks pagination: WordPress works out how many pages exist from the main query, so page 2 of your custom list can return a 404. That exact mistake is the second item in the list below.

Should archive pages be indexed by Google?

There is no single right answer, but there is a sensible default. Category archives with a written description and a clear subject are often good landing pages, so keep them indexable. Tag archives that hold one or two posts each add little and can be set to noindex in your SEO plugin. On a single-author blog, the author archive repeats the main blog list, so many sites noindex it or turn it off.

Author archives have a security side too. The /?author=1 URL redirects to the author’s pretty URL, which reveals login-style usernames. Our guide on user enumeration through the REST API, sitemaps, oEmbed and author archives walks through what leaks and how to close each path.

Whatever you decide, decide once and apply it through the SEO plugin rather than deleting terms. Deleting a category with traffic turns its archive into a 404. If you removed one by accident, our walkthrough on restoring a deleted WordPress category covers the recovery options. And for the bigger question of how URL structure affects search, see whether permalinks are a key to better WordPress SEO.

Common mistakes people report

These problems come up again and again in the WordPress.org forums and the Gutenberg issue tracker. Each one links to a real thread; we checked them on 18 November 2026.

  1. Custom post type posts missing from category archives. When a post type shares the built-in Category taxonomy, its posts still do not appear on /category/name/, because category queries only look for regular posts. A forum moderator explains the fix: add the post type to the query with pre_get_posts. Thread: Custom Post Type Categories Not Displaying On Archive Page.
  2. Page 2 of an archive returns a 404. This almost always comes from a custom WP_Query in the template with a different posts-per-page value from the main query. The advice in the thread is to let the main query run the archive and change it with pre_get_posts. Thread: Custom Post Type Pagination Showing 404 On archive pages.
  3. Every category page shows the same posts in a block theme. The Query Loop in the archive template has “Inherit query from template” switched off, or a fixed category filter was added. Users also report that the editor preview does not change when you turn the setting on, even though the front end does. Threads: Query Loop Inherit query from template doesn’t work and Gutenberg issue #42675.
  4. “Category:” printed before every archive title. Site owners try to hide it with CSS, which fails in many themes because the prefix is plain text inside the heading. The filter or the Query Title toggle above is the reliable fix. Thread: How to not display category prefix on page.
  5. A new post type archive gives a 404. The post type was registered or changed, but the rewrite rules were never rebuilt. Saving Settings > Permalinks once fixes it. The flush_rewrite_rules() reference explains why you should not flush on every request.

Frequently asked questions

Where are archive pages stored in WordPress?

Nowhere, as a page. WordPress generates them on each request from the posts and terms in the database. The category and tag names live in the terms tables and the link between posts and terms in wp_term_relationships. Our post on how many tables a default WordPress install has shows where each piece sits.

Can I make a normal page called “Archives” that lists everything?

Yes. Create a page, add an Archives block, a Categories List block and a Tag Cloud block, and publish it. It is a regular page that links to the generated archives. Do not give that page the slug category or tag, or it will clash with the archive URLs.

Why does my archive show only post excerpts?

That is the theme’s choice. Classic themes often call the_excerpt() in archive.php. In a block theme, open the archive template and swap the Post Excerpt block for Post Content inside the Query Loop.

Do archive pages work with plain permalinks?

Yes, they work with query-string URLs such as /?cat=12 and /?m=202611. They are harder to read and share, so pretty permalinks are the better choice on any public site.

How do I hide an archive type completely?

There is no core switch. The usual approach is to redirect the archive with a small template_redirect function, or to set it to noindex in an SEO plugin and leave it out of menus. Redirect only archives nobody links to, and use a 301 to a sensible page such as the blog home.

Where to go from here

If you remember one thing, make it this: archive pages are generated, their URLs follow fixed patterns, and the dashboard gives you a View link for almost every one of them. When an archive misbehaves, the cause is nearly always one of three things: a post type registered without an archive, rewrite rules that were never refreshed, or a template that runs its own query instead of the main one.

To give visitors a clean path into your archives, add the most useful categories to your header menu. Our guide on the HTML WordPress outputs for navigation menus explains what that menu markup looks like and how to style it.

Part of the Wbcom Designs family

The all-in-one WordPress community stack

Also ours: wbcomdesigns.comvapvarun.combrndle.com