Skip to content

Instantly share code, notes, and snippets.

@djrmom
djrmom / custom-hooks.php
Created March 4, 2019 16:32
facetwp change date format in layout builder
<?php
add_filter( 'facetwp_builder_item_value', function( $value, $item ) {
if ( 'el-ymud8n' == $item['settings']['name'] ) {
$value = date_create( $value );
$value = date_format( $value, "d-m-Y" );
}
return $value;
}, 10, 2 );