By default, WordPress adds a prefix to the titles of archive pages. A category archive for “Hiking” gets the title “Category: Hiking”, a tag archive gets “Tag:”, and there are similar prefixes for author archives (“Author:”), date archives (“Year:”, “Month:” and “Day:”) and post type archives (“Archives:”). Custom taxonomies get the name of the taxonomy as their prefix.
The prefix makes it clear what kind of page you’re on, but most of the time, it just looks like clutter. Visitors can usually tell what they’re looking at from the context, which is why the category pages on this site, like Block themes and Hiking, only show the name of the category. It’s sensible for WordPress to include the prefix by default, but equally understandable why removing it is one of the most common questions I get in the support forums for my WordPress themes.
Let’s take a look at how to do it. There’s a setting for it in block themes, and a single line of code for classic themes.
In a block theme
In block themes, the archive title is output by the Query Title block in your archive templates. The block has a setting for the prefix, so we don’t need any code at all:
- In the admin, go to “Appearance” → “Editor” → “Templates”.
- Open the template used for your archives. In most themes, it’s called “All Archives”, but your theme might also have more specific templates, like “Category Archives” or “Tag Archives”.
- Select the Query Title block, which is usually near the top of the template. It shows the title of the archive, like “Archive type: Name” or “Category: Name”.
- In the block settings in the sidebar, turn off “Show archive type in title”. The block will then say “Archive title” or “Category name”.
- Click “Save”.

If your theme has more than one archive template, repeat the steps for each template with a Query Title block in it.
If you’re a theme developer, you can turn off the prefix in the block markup of your templates and patterns instead, with the showPrefix attribute:
<!-- wp:query-title {"type":"archive","showPrefix":false} /-->
In a classic theme
Classic themes usually output the archive title with the the_archive_title() function. Back in the olden days, you had to use a pretty tricky regex filter to remove it, but thankfully, that’s no longer the case. Since WordPress 5.5, the prefix can be changed with the get_the_archive_title_prefix filter. To remove the prefix from all archive titles, simply add the following code to the functions.php file of your child theme, or with a code snippets plugin:
add_filter( 'get_the_archive_title_prefix', '__return_empty_string' );
__return_empty_string is a function included in WordPress that does exactly what it sounds like: it returns an empty string. That replaces the prefix with nothing, for every type of archive.
The filter works in block themes too, since the Query Title block gets its title from the same function. If you want to remove the prefix on every archive without editing each template, you can use this snippet in a block theme as well.
If you only want to remove the prefix from category archives, and keep it on tag, author and date archives, we can check which type of archive we’re on before removing it:
function xx_remove_category_title_prefix( $prefix ) { if ( is_category() ) { $prefix = ''; } return $prefix;}add_filter( 'get_the_archive_title_prefix', 'xx_remove_category_title_prefix' );
You can switch out is_category() for any of the other conditional functions in WordPress, like is_tag(), is_author() or is_date(), depending on which prefixes you want to remove.
If the filter doesn’t change anything, your theme probably outputs its own archive titles instead of using the_archive_title(). In that case, check the theme’s documentation or support forum for a setting, or ask the theme developer.
Why not hide it with CSS?
If you search for this, you’ll find plenty of solutions that hide the prefix with CSS. They work because WordPress wraps the title itself in a span element, which makes it possible to hide the prefix. But the prefix is still in the HTML of the page, so screen readers will read it out loud, and search engines will see it. Removing it with the setting or the filter is cleaner, and just as quick.
Also note that this only changes the heading on the archive page. The title in the browser tab and in search results is the document title of the page, which you can change with an SEO plugin like Yoast SEO.
That’s it! Your archive titles should now just show the name of the category, tag or author.








