Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
Philipp

Custom Field Filter – Multiple Choice (checkbox?)

i wonder if it would be possible to have a multi selection option in die Filter for custom fields?

Lets say i have a custom field “delivery day” Monday – Friday and i want to filter the orders that are monday and thursday only.

a picture speaks a thousand words:

how it would be nice: (yes i know my photoshop skills are amazing)

2 years, 3 months ago
Stefan
Developer

Hi Philipp,

Thanks for your feedback.
First of all, all our filters works with the ‘AND’ operator which means that if you should have set a filter to Monday and Friday, that there are no results, since you probably have not custom fields with both Monday and Friday selected for 1 post.

Although I think you have a valid use case, we think that filtering the way we do it right now (narrowing down instead of wider search) is the most common use for our plugin at this moment. Making it more flexible will also make it a lot more complex to manage for the users so we probably won’t develop this any time soon. On our roadmap we have a feature to implement search and we’re still not sure how we’re going to do this. But this input may help us to choose the right direction.

2 years, 3 months ago
Philipp

when you say works with the AND operator are you talking about the AND operator between multiple different Fields?

as in “deliveryday” = “MONDAY” AND “someotherfield” = “value” ? or are you talking that i could set “deliveryday” = “MONDAY” AND “FRIDAY”

AND functionality is exactly what i want…but for one field. perhaps there is a way and i am missing it?

the checkboxes are just gimmicks if i could enter manually into the field with semicolon as separator or something that would be fine too.

2 years, 3 months ago
Stefan
Developer

Hi Philipp,

I did some testing but our plugin is not yet ready to support the AND operator for a single filter.
Like you said, the AND functionality works for both different field but also for the same field. But since it is not possible to alter the dropdowns to work with multiple values I thought of the following workaround for your case.

You could duplicate the column so you have 2 filters for the same field. You could hide the column itself by disabling it in the screen options (right top of the page). I know this is not ideal and this only works if you want to filter on 2 values for the same custom field. Besides that, this only works if a post has multiple values stored as a custom field. If the value is somehow stored serialise as 1 custom field, it also does not work. This is because we just do a meta_query in the background for the filtered custom field.

I hope this makes sense and we’re sorry that we cannot help you any further with this.

2 years, 3 months ago

You must be logged in to reply to this topic.