Change the archive title to show date not category
-
I am wondering if it’s possible to change the archive title to show the date instead of category?
I have an index of posts sorted by date. When a user clicks on a month, a post page is generated listing all posts for that month. At the top of the page, I would like it to show the month/year instead of the category (in this case “news”).
This is the code used by the archive.php file.
<header class=”page-header”>
<?php
the_archive_title( ‘<h1 class=”archive-title”>’, ‘</h1>’ );
the_archive_description( ‘<div class=”taxonomy-description”>’, ‘</div>’ );
?>
</header><!– .page-header –>I’m not sure if this is where I need to make modifications or if they should go in the function.php page?
Any help would be appreciated.
- The topic ‘Change the archive title to show date not category’ is closed to new replies.