Sorry, to be so late. Tried your solution. Unfortunately it failed.
I keep getting syntax error, unexpected '=>' (T_DOUBLE_ARROW)
Double checked the code. Tried to split it up, no luck.
Running: PHP 7.4.1. WPSP: 1.2.0-alpha.3
add_filter( 'wp_show_posts_shortcode_args', function( $args, $settings ) {
if( 123 === (int)$settings['list_id'] ){
$user_id = get_current_user_id();
$args['author'] = $user_id;
$args['meta_query'] => array(
array(
'key' => 'acf_field_name',
'value' => date('Ymd'),
'type' => 'date',
'compare' => '<='
)
);
}
return $args;
}, 15, 2 );
My editor highlights the line $args['meta_query'] => array(
with the unexpected error.
Any suggestions? Or alternatives?
Thank you for your help.
J