@hube2 so I have the code written and it work. Only problem is I need to call when I press a submit button in a form. Is there anyway to call separate functions with different arguments. Or is there a way to write this code inside my other function. I just don’t know if you can have an action and a filter in the same function.
So I tried this and got nothing.
function add_location() {
$field_group = apply_filters( 'acf/load_field_group', $field_group );
if ($field_group['key'] = 'group_5fc70b388fe13')
{
array_push($field_group['location'],
array(
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'registration',
),
)
);
return $field_group;
}
}
add_action('init', 'add_location');