How to customize the_archive_title()?
In my child theme's archive.php
, I have the following code for displaying the title of my archive pages:
?php
the_archive_title( 'h1 class=page-title', '/h1' );
?
But that displays my titles as Category: Category Title instead of simply the title without the prepended Category: .
My first instinct was to override get_the_archive_title()
from wp-includes/general-template
. But from what I've read, apparently I'm not supposed to ever alter wordpress core stuff, even with overrides from a child theme.
So what is the best-practice way to control the output of the_archive_title()
?
Topic child-theme functions Wordpress
Category Web