Forums › Forums › Search & Filter Pro › Post Meta “Time” and ACF “Datetime”
Tagged: V3
- This topic has 10 replies, 2 voices, and was last updated 4 years, 2 months ago by Trevor.
-
Anonymous(Private) November 16, 2020 at 1:12 pm #266545
Hello,
I wanted to know if the Post Meta – Date field was compatible with the ACF Datetime field?
I set the “Date Input Format” option toYYYYMMDD (ACF)
but it doesn’t work.If not, am I forced to split the date and the time?
I would like to avoid for my meta_query in “sf_edit_query_args” function:
function filter_function_name( $query_args, $sfid ) { if( $sfid == 73 ) { $now = current_time('Y-m-d H:i:s'); $query_args['meta_query'] = array( array( 'key' => 'live_datetime', 'value' => $now, 'compare' => '>', 'type' => 'DATETIME', ) ); } return $query_args; } add_filter('sf_edit_query_args', 'filter_function_name', 20, 2);
Thanks in advance!
-
AuthorPosts