FacetWP index ACF date in F j, Y format

mgibbs189

{{gist file=”functions.php” lang=”php”}}
<?php

/**
* reindex after adding or updating this filter
*/
add_filter( ‘facetwp_index_row’, function( $params, $class ) {
if ( ‘dates’ == $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 );

{{/gist}}