- This topic has 1 reply, 2 voices, and was last updated 6 years, 2 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › ACF sorty by relationship field
Tagged: acf, Custom Posty Type, relationship field, sort by
Not easily, sorry, no (if at all). The problem is that we index the cache by that ID, because, in the posts being searched, that is all ACF stores in the custom field. For the form, we have to use some code to grab the label.
What you would have to do is set no sort in the form settings, but instead use this filter:
https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments
In that, you would need to somehow (I don’t know how) need to create an array with the post IDs of the related post type and their labels, and some how set up an orderby that would do what you want. As I said, I cannot think how that could be done.