If you want to remove the word “Category” or “Tag” from the title, it depends on what version of WordPress you are running.
For v5.5 or newer add this to your functions.php …
add_filter('get_the_archive_title_prefix', 'twenty_one_get_the_archive_title_prefix');
function twenty_one_get_the_archive_title_prefix($prefix) {
if ($prefix === 'Category:' || $prefix === 'Tag:') {
$prefix = '';
}
return $prefix;
}
… or for older versions of WordPress …
add_filter('gettext', 'twenty_one_replace_archive_titles', 10, 3);
function twenty_one_replace_archive_titles($translation, $text, $domain) {
if ($text === 'Category: %s' || $text === 'Tag: %s') {
$translation = '%s';
}
return $translation;
}
Let me know if that works and I’ll add it to the Options for Twenty Twenty-One plugin.
Oliver
Otherwise, if you want to remove the entire title, you can do this with CSS added to “Customizer – Additional CSS” …
.archive .page-header {
display: none;
}
Oliver
Hi Oliver
Thank you so much the CSS worked
Glad it worked. It’s now an option in the plugin Options for Twenty Twenty-One.
Oliver