How to change the date format RSS items in Feedzy

By default, RSS items displayed using the Feedzy shortcode or the Feedzy block use the Month D, Y date format, which can be easily changed using the new feedzy_meta_date filter.

To change the date format, add any of the following codes at the end of the functions.php file of your child theme - how to create a child theme
This can be added at the end of the functions.php file of your theme as well. In this case, you need to add this code snippet every time you update the theme.

X days/weeks/months ago

add_filter( 'feedzy_meta_date', function( $date, $date_time, $feed_url, $item ) {
	return human_time_diff( $date_time, current_time( 'timestamp' ) ).' '.__( 'ago' ) . ' ';
}, 10, 4 );

MM-DD-YYYY

add_filter( 'feedzy_meta_date', function( $date, $date_time, $feed_url, $item ) {
	return date("m-d-Y",$date_time);
}, 10, 4 );

Y/d/m H:i

add_filter( 'feedzy_meta_date', function( $date, $date_time, $feed_url, $item ) {
	return date("Y/d/m H:i",$date_time);
}, 10, 4 );
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us