Archived topic
Remove "Day" From Appearing
3 replies · Started by tbgr on December 9, 2019
Good morning.
I have the Calendar widget installed on the bottom-right of my website. It's called "TBGR Archives."
When you click one of the calendar's days for which there's a post, it DOES take you to that post.
However, it also has a headline such as: "Day: October 8, 2019"
I don't want the word "Day" to appear before the date of the post. Is there a way to remove "Day"?
Thank you.
Hi there,
try this PHP snippet:
add_filter( 'get_the_archive_title', function ( $title ) {
if( is_day() ) {
$title = get_the_date( _x( 'F j, Y', 'daily archives date format' ) );
}
return $title;
});
Adding PHP: https://docs.generatepress.com/article/adding-php/
Thank you.
You're welcome