Support

Search results for ""

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

ACF Filter doesn’t work

Hi,

I have a ACF called “Menu”, for this field I’ve setup in Admin Column, “Filter” to true:
Column Setup

This is the ACF setup:
ACF Setup

But in the select the filter is empty:
Filter empty

Let me know, thanks!

7 months ago
Stefan
Developer

If you use the Filtering feature for the ACF select field, it will only show the options that are actually use for your post type (Pianificazioni). I do see that ‘Menu’ is used for at least one post in your screenshot.
Do you even when you save the post, have a filter without the ACF option?

If so, did you maybe change the ACF field from ‘multiple’ to ‘single’ or the other way around?

7 months ago
Sergio Belgrano

Do you even when you save the post, have a filter without the ACF option?

Yes

If so, did you maybe change the ACF field from ‘multiple’ to ‘single’ or the other way around?

No changes to this ACF field

I don’t know how, but now I see that the filter is populated with the list of all menu, except for one: “Executive”.

The menu filterable are:
Executive
Business 1a full
Business 1a light
Premium
Bar Bistrò
Servizio al posto
FL Flaghship
FL Classic
FRECCIAClub
Assistenza straordinaria

The filter now propose all these options except “Executive”.

In the list of “Pianificazioni” posts exist at least one post assign for each menu.

So, I don’t know how the filter propose me all the menu execpt for “Executive”.

Filter populated except for one option

Let me know, thanks!

7 months ago
Stefan
Developer

The dropdown options in the filter are cached for 5 minutes.
But I guess you have used the Executive option for a bit longer than that.
Do you have at least one published post where Executive is chosen for that field?
If you don’t have a large dataset, you could try to disable the cache completely by adding the following hook to your site.

add_filter( 'acp/filtering/cache/enable', '__return_false' );

7 months ago
Sergio Belgrano

Do you have at least one published post where Executive is chosen for that field?

Yes.

I’m going to try with this hook, I’ll come back to you if it not works.

Thanks!

7 months ago

You must be logged in to reply to this topic.