Change date format in category page

Hi,

I would like to change the date format in the category page.

I’m pretty sure it’s in the code below. I would like to have only the Year. Not the day and Month. Sorry for my poor english. :slight_smile:

You can visit this link.

Dominic

(inc/template-tags.php)

function astrid_posted_on() {

$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
	$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}

$time_string = sprintf( $time_string,
	esc_attr( get_the_date( 'c' ) ),
	esc_html( get_the_date() ),
	esc_attr( get_the_modified_date( 'c' ) ),
	esc_html( get_the_modified_date() )
);

Hi,

Where it says get_the_date() replace with get_the_date( 'Y' ). The same for get_the_modified_date()

That’s exactly I was looking for… and it works. Thank you so much. I appreciate a lot.
Have a nice day!