2

Use in_array(), like this: $search = [ 'AAA', 'BBB', 'CCC', 'DDD' ]; $meta = get_post_meta( $post->ID, 'MY_CUSTOM_KEY_A', true ); if ( in_array( $meta, $search ) ) { update_post_meta( $post->ID, 'MY_CUSTOM_KEY_B', 'ZZZ' ); }


1

There is a native solution provided by ACF nowadays. You can set the position of your group of fields. By default it's set to "Position : High (after title)" but you can change it when you edit your group of fields.


Only top voted, non community-wiki answers of a minimum length are eligible