Skip to content

Instantly share code, notes, and snippets.

@djrmom
Created March 4, 2019 16:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djrmom/249ee8bb2debdbff7de10af230c3aea7 to your computer and use it in GitHub Desktop.
Save djrmom/249ee8bb2debdbff7de10af230c3aea7 to your computer and use it in GitHub Desktop.
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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment