Today, I was overjoyed to stumble across a new filter in the function that gets the archive title in WordPress: get_the_archive_title(). This filter allows you to easily change the word/prefix “Archives: ” to whatever you want or to NOTHING.

I generally was never a fan of the prefixed text: “Archives: ” and “Category: ” coming before the post type name or the taxonomy term. I suppose it is WordPress‘s way of letting you know where you’re at, but if the site is designed correctly and breadcrumbs are used, it’s sort of unnecessary. Plus, the word “Archive” sounds like it’s something old. Many times, events are upcoming, and they are in the archives. Go figure.

It used to be sort of a hack and a PITA to make this text go away, often using something that looked like this:

add_filter( 'get_the_archive_title', function( $title ) {

     $title = str_replace( 'Archives: ', '', $title );

}, 10, 1);

But now, this is all you need:

add_filter( 'get_the_archive_title_prefix', '__return_false' );

SPLENDID.

Frequently Asked Questions

What is get_the_archive_title() In WordPress?

get_the_archive_title() It is a WordPress function that retrieves the title of archive pages, such as categories, tags, authors, or date archives.

Why does WordPress add prefixes like “Archives: ” or “Category: ” to archive titles?

WordPress adds these prefixes to help users identify the context of the page, indicating that it’s an archive or category page. However, if your site design already clearly shows navigation and context, these prefixes can sometimes be redundant.

Can I remove or customize the “Archives: ” prefix in the archive title?

Yes! Previously, removing or changing this prefix was a bit tricky and required using filters to manually replace or remove the text.

Why would I want to remove the prefix like “Archives:” or “Category:”?

Removing the prefix can create a cleaner and more modern look, especially if your site already uses breadcrumbs or other navigation elements that clarify the context. Also, the word “Archive” may be misleading if the content is upcoming or current.

Will removing the prefix affect SEO or site usability?

Usually not, as long as your site provides clear navigation cues elsewhere, such as breadcrumbs or page titles. The prefix is mostly for user clarity, but is optional.