Home Forums Front-end Issues ACF Search in Post Object Reply To: ACF Search in Post Object

  • A post object field only stores the post ID of the post object and not the name. Since the name of the post is not associated with the posts you are searching (“events”) you cannot search by the name.

    To do this you need to create an acf/save_post filter. In this filter you get the related post object and update some other field to hole the post name and then you search using this other custom field. I usually do not use an ACF field for this and just use update_post_meta() and use a meta key that will not conflict with other field names.