<?php
/**
* Re-index after adding this filter to your functions.php
* Replace 'my_date_facet' with the name of your facet
* For other date formats, see: https://www.php.net/manual/en/function.date.php
*/
add_filter( 'facetwp_index_row', function( $params, $class ) {
if ( 'my_date_facet' == $params['facet_name'] ) {
$raw_value = $params['facet_value'];
$params['facet_display_value'] = date( 'F j, Y', strtotime( $raw_value ) ); // "April 10, 2019" for the display value
}
return $params;
}, 10, 2 );