Hi, how would you target a sub field inside a $_POST function? for example, ‘conditional’ is is the group field, ‘cond-options’ is its sub field:
$hero = get_field('conditional');
$pls = ( $hero['cond_options'] );
if( $hero ):
if( isset( $_POST['weather'] ) && $_POST['weather'])
$args['meta_query'][] = array(
'key' => $pls,
'value' => $_POST['weather'],
'compare' => 'LIKE'
);
endif;
I tried different variations of the above, but there is something I must not understand in here.
Short background: I have an ajax form filter that is looking into posts acf fields.
Thanks
'key' => 'conditional_cond_options',
'value' => $_POST['weather'],
'compare' => '='
Thank you, it works great for me.