This support ticket is created vor 4 Jahren, 12 Monaten. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
I am trying to show all the values in the form inputs that are available also the ones that will result in no items found.
I have a filter for the type of the object. Like rent, hire purchase and property. I have a lot of objects in the type rent but none in the two other types. Although the two other types should be in the filter inputs of the search, so the user knows that there can be also objets with these types. If the user wants to search for objects with the type property the results will be empty.
I already clicked on show all values in the form inputs show all values in the form inputs (see attachment). But the empty types are not showing up in the search.
2. The filter that I have used are custom fields from the post type. The custom field is a radio button type. The filter in the searchbar are checkboxes.
I tested a similar set up locally and couldn't reproduce the problem, when I specified in the View settings that all filter inputs should be displayed, all were displayed, even those which were unused on any posts.
Can I get access to your site to have a look?
I will mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
First, one problem I noticed with your site, you have inserted search filters for 3 custom fields, which automatically insert corresponding Query Filters.
One of the Query Filters is missing (screenshot), it must have been deleted.
I edited your objektart filter control which has now re-inserted the Query Filter.
That doesn't fix the problem.
The issue is that you are using Advanced Custom Fields instead of Types for these fields.
Views doesn't know anything about how ACF fields are defined. For non-Types fields, it just knows what it can find assigned to posts.
I edited on sample post and changed the field value to Mietkauf and then reloaded the page with the View, and—sure enough—the filter included the option for Mietkauf.
If you are not using Types for your custom fields, Views filters don't know what all the possible options are, they can only see what is saved in post meta.
So, in this case, what you are describing is expected.
What do you mean instead of Types? Which types?
The result is that how the search is built there is no solution by showing all of the value inputs. Am I correct?
Types is the name of the Toolset plugin used for creating custom fields. Because it is part of Toolset, Views knows the different options available to radio fields even if they are not used on any posts.
Views cannot know the same about custom fields created with ACF, and will only show filter options for values it finds assigned to posts (and, per the setting, it will show all the values it finds).
If you use ACF to create your custom fields Views cannot show options which are not assigned to any posts.