Home Forums General Issues my_acf_save_post and conditional issues Reply To: my_acf_save_post and conditional issues

  • EDIT: Actually what ended up happening was as I was changing some varaibles I misspelled one of them.

    After looking over everything it seems that my get_posts is not returning anything in the array and is NULL.

    $teamLeaders = get_posts(array(
                    'post_type' => 'mro_volunteer',
                    'meta_query' => array(
                        'key' => 'assigned_project', // name of custom field
                        'value' => '"' . get_the_ID() . '"', // matches exaclty
                        'compare' => 'LIKE'

    This is the correct post type and correct key, I checked the volunteers that are published and they all have the project in question assigned to them through the relationship field. I’m not sure why it can’t query them. It’s limited to only one if that makes any difference.