Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Using date_format on custom date field returns “now” › Reply To: Using date_format on custom date field returns “now”
December 6, 2024 at 4:46 pm
#52181
Keymaster
All right, no problem. In that case let’s solve this via a custom code snippet.
First, make sure to use the field like this (without the date format, so it’s not processed):
{evcal_srow}
Then use this custom code snippet:
add_filter('asp_cpt_advanced_field_value', function($value, $field_name){
if ( $field_name != 'evcal_srow' ) {
return $value;
}
return date_i18n( "F j, Y", $value);
}, 10,2);
This will process the field afterwards, and hopefully should do the trick.