Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
David

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.

8 years, 4 months ago
Stefan van den Dungen Gronovius
Developer

Hi David,

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.

Github ticket

8 years, 4 months ago
David

Stephen,

Great to hear. That’s definitely above my level on development, or even fully understanding the technical details, but I hope this all works out! Thanks for the update.

8 years, 4 months ago

You must be logged in to reply to this topic.