Snippets: Display Modified Date in Post Types Grid

This snippet will override the default published date for the Total Post Types Grid builder block to instead display the last modified date.

add_filter( 'vcex_post_type_grid_date_inner', function( $date ) {
	if ( get_the_date( 'U' ) !== get_the_modified_date( 'U' ) ) {
		$date = 'Last updated on ' . get_the_modified_date( get_option( 'date_format' ) );
	}
	return $date;
}, 10 );
All PHP snippets should be added via a child theme's functions.php file.