Snippets: How to Add Japanese Year 年 to get_the_time

add_filter( 'get_the_time', function( $the_time, $d ) {
	if ( 'y' == $d ) {
		$the_time = $the_time . '年';
	}
	return $the_time;
}, 10, 2 );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.