How to customize the_archive_title()? Cannot figure out how to change the value it produces

I’ve searched the web for help on this, I found similar questions, but not exactly what I’m looking for. Hopefully someone can help.

The following code is in my theme’s archive.php file:

<header class=”entry-archive-header”>
<?php
the_archive_title( ‘<h1 class=”entry-title entry-archive-title”>’, ‘</h1>’ );
the_archive_description( ‘<div class=”category-description”>’, ‘</div>’ );
?>
</header>

the_archive_title section of the code is causing the following text to appear on my WP page:

Archives: Projects

It’s formatted a certain way where the text is large and bold. It looks really nice however, I want to change the value of this. I want it to display the following instead:

Viewing All Offices

I’ve literally have tried to do everything. I’m a bit of a noob at WP, but this is my first time doing this. I could not figure how how to change the text value to that.

If someone can please help me out, that would be great. Looking for the most cleanest and secure solution.

Read more here:: How to customize the_archive_title()? Cannot figure out how to change the value it produces

Leave a Reply

Your email address will not be published. Required fields are marked *