Show modified date instead of published date

Content Views helps you to show posts with their information (title, thumbnail, content, date, so on) in the grid and list easily.
About date, the published date will be shown by default.

  • If you are using Content Views Pro version 5.8.0 and higher versions, you can select the option:

    Show the modified date instead of the published date
    

    under Display Settings >> Fields Settings >> Meta Fields.

  • If you are using Content Views Pro version 5.7.1 (and prior versions), to show the modified date instead of the published date, please add this code to file functions.php in the theme’s folder (or install this plugin Code Snippets then add this code to the “Code” textarea):
    // Content Views - Show modified date
    add_filter( 'pt_cv_field_meta_date_final', 'cvp_theme_field_meta_show_modified_date', 100, 2 );
    function cvp_theme_field_meta_show_modified_date( $args, $utc_time ) {
    	global $post;
    	$args = mysql2date( get_option( 'date_format' ), $post->post_modified );
    	return $args;
    }
    

Best regards,

Scroll to Top