Is it possible to add Filter option for ACF Relationship filed?
I understand this is not currently supported, but does anyone know if this is in the works?
Or has anyone developed a workaround to achieve this? I’ve got a limited number of relationship values (posts from another custom post type) and it’d be awesome to be able to sort by filtering based on this ACF relationship field.
6 years, 10 months ago
ACF stores the data of the relation field as a serialized value. While the ACF relations field only contains ID’s of posts, it it possible to search in this field by using a LIKE statement in the query ‘”‘ . get_the_ID() . ‘”‘. So filtering should be possible. The next step is to populate the filter dropdowns with ID’s of used relational posts for this specific field.
I think it should be possible to make this columns filterable but we have to look carefully to the performance of this. I’ve created a new ticket on Github to reevaluate filtering for this ACF field.