Skip to content

Snippet: Change Published Date to Modified Date in WPBakery Post Grid

The following snippet will alter the default date in the WPBakery Post Grid module with the last modified date.

add_filter( 'vc_gitem_template_attribute_post_date', function( $value, $data ) {
	extract( array_merge( array(
		'post' => null,
		'data' => ''
	), $data ) );
	return 'Last updated on ' . get_the_modified_date( get_option( 'date_format' ), $post );
}, PHP_INT_MAX, 2 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top