Restrict WordPress search to a single ACF field
I ended up using a simple meta_query: $args = [ ‘post_status’ => ‘publish’, ‘post_type’ => $post_type, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘my_acf_field’, ‘value’ => $search_term, ‘compare’ => ‘LIKE’ ), ) ]; $query = new WP_Query($args);