Support

Search results for ""

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

Sort & Filtering on ACF Text field not showing up

Merry Christmas :)

I have a simple 4 character limit ACF text field linked to Custom Taxonomy Term.
In the Admin Columns screen, Enable Editing is offered, but no Sorting or Filtering.

Screenshots:
https://snag.gy/mLnNjb.jpg
https://snag.gy/k8tLKX.jpg

Urgent help please. Thank you.

7 years, 9 months ago
Jon

Also, even with or without the 4 character limit on the ACF text field, the field also doesn’t show up as a Custom Field in the Admin Columns dropdown either.

Overall, it looks like there are no sorting or filtering options offered for any Admin Columns field ?? … Very odd.

7 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

Hi Jon,

Sorry for the late response.
It is correct that both sorting and filtering is not possible for the Taxonomy overview pages for ACF fields.
The problem is that ACF does not store the values in the taxonomy meta table. Instead they store the values in the options table with a specific taxonomy prefix. This means that we cannot use the WordPress metaquery to sort and filter on those fields.
This is the same reason why your ACF fields are not available in the custom field dropdown, because it is not really a taxonomy meta (custom) field.

7 years, 9 months ago
Jon

Hi

Thanks for the info. Apologies for the late reply.

So why are other custom fields for ACF relating to my taxonomy term showing up in Admin Columns ?

7 years, 9 months ago
Jon

More info for you:

My field group (located/showing up only on a taxonomy term) has 8 fields of varying types, and one simple text field is the only one that is not appearing in the Admin Columns ACF field selection dropdown (when adding a new column) and in the normal Custom Field selection dropdown (when adding a new column).

Your explanation doesn’t make sense, as all the other fields including an amateur 3rd party ACF plugin field for a Year type field all show up in the Admin Columns dropdown for ACF and Custom Fields when adding a new column.

7 years, 9 months ago
Stefan van den Dungen Gronovius
Developer

Hi Jon,

I did some further investigation and these are my findings

Custom Field column
The custom field dropdown contains all available keys found in the post_meta table for all post_types.
I looked again in our code and for Taxonomies we do something different specifically for ACF. We look for all available keys in the options table instead of the taxonomy_meta table (I did forgot about this). But since ACF 5.5.0 all values are stored in the termmeta table instead of the options table like I said earlier. In fact this is great, because this means that when we support termmeta in our custom field column, this should work for both the native WordPress termmeta and ACF taxonomy fields. We can even have a look on supporting sorting and filtering for Taxonomy columns.

Related to your issue, I think the following is happening. Is it correct that your ACF text field is newer than the other ACF fields? Or to be more specifically are the old ACF fields created before 28 November 2016 (< V5.5.0) because this would explain why the new ACF text field is not displayed in the custom field dropdown, because it is not stored anymore in the options table. I hope this explanation explains the issue. Sorting and filtering is currently not supported for Taxonomies but this feature in on our roadmap. Unfortunately you can't use the custom field column to show the value for your new ACF field but you should be able to use the ACF column, I've seen this is your earlier screenshots. This feature request describes the support of sorting, filtering for custom field and ACF column for taxonomy overviews https://github.com/codepress/admin-columns-issues/issues/655

7 years, 9 months ago

You must be logged in to reply to this topic.