Skip to content

Instantly share code, notes, and snippets.

@MjHead
Last active January 29, 2019 15:50
Show Gist options
  • Select an option

  • Save MjHead/b9abe94a966148f7a85e1ce76bc169fe to your computer and use it in GitHub Desktop.

Select an option

Save MjHead/b9abe94a966148f7a85e1ce76bc169fe to your computer and use it in GitHub Desktop.
add_filter( 'jet-engine/listings/filters-list', 'jet_engine_add_format_date_filter' );
function jet_engine_add_format_date_filter( $filters ) {
$filters['format_date'] = array(
'cb' => 'jet_engine_custom_date_format',
'args' => false,
);
return $filters;
}
function jet_engine_custom_date_format( $date ) {
return date( 'F j, Y', strtotime( $date ) );
}
// Usage:
// %field_name_here|format_date%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment