Answer the question
In order to leave comments, you need to log in
How to filter by field (multiple choice)?
I don't understand how to make such a request. Resources have a "multiple choice" field, where the type of fuel "Gasoline", "Diesel" is selected. There is also a multiple choice in the filter on the site (with checkboxes) Gasoline Diesel
If a person selects Gasoline and Diesel in the filter, you need to display the results of who in the admin panel is selected in the list (multiple) Gasoline, Diesel, Gasoline and Diesel
If in the admin panel there is a single list everything is simple
if(isset($_GET['fuel_type']) && !empty($_GET['fuel_type'])) {
$where[] = 'fuel_type IN (' . implode(',', $_GET['fuel_type']) . ')';
}
Answer the question
In order to leave comments, you need to log in
Have you seen how the value of such a field is stored in the admin panel? Look, I think it will immediately become clear what request to write.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question