Hi
Sorry for the slow reply, my previous ticket got closed.
It seems to be an issue with the custom code snippet you provided:
add_filter( 'wpv_filter_query', 'func_custom_date_filter_query', 10, 3);
function func_custom_date_filter_query( $view_args, $view_settings, $view_id ){
if ( 71155 == $view_id ) {
if ( (isset($view_args['meta_query'])) && (!empty($view_args['meta_query'])) ) {
$target_field = "_wpscp_schedule_draft_date"; // change this field slug to your field slug
foreach ($view_args['meta_query'] as $key => $value):
if ($value['key'] == $target_field){
$date_range = explode(",",$value['value']);
$start = date('Y-m-d', $date_range[0]);
$end = date('Y-m-d', $date_range[1]);
$view_args['meta_query'][$key] = array('key' => $target_field,
'value' => array($start,$end),
'type' => 'DATE',
'compare' => 'BETWEEN' );
}
endforeach;
}
}
return $view_args;
}
Any ideas why this may have suddenly stopped working?
Says fatal error.
/public_html/wp-content/toolset-customizations/toolset-custom-code.php on line 21
Thanks.
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Hi Matt
Do you have details of what the error actually is?
Your debug.log should give details of the error other than just the line number.
(Christopher shared how to turn on the debug.log if it is not already active in the last thread.)