Saltar navegación

[Asignado] Adding a range filter to a view

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuestas, tiene 1 mensaje.

Última actualización por lesleeM 1 hour, 57 minutes ago.

Asistido por: Minesh.

Autor
Mensajes
#2862230

Our Rides content type has 3 custom fields to define the distance of the ride. The fields are mileage1, mileage2, and mileage3. We have 3 because each ride can have multiple options for the number of miles. We offer different paces with many of our rides and each pace can have its own distance.

We have a full list of our rides present on a Ride Maps page where people can currently choose the ride from a dropdown of ride titles or by a filter set on the Ride County field.

We are interested in adding another filter here based on the Ride Distance (the 3 mileage fields). We want to offer selectable range options and have the filter check if ANY of the three mileage fields fall within this range. For example, we'd have the range options set as

Up to 20 miles
21-30 miles
31-40 miles
41-50 miles
Over 50 miles

And the results would show all rides where ANY of the three mileage fields fall within the range option chosen by the end user on the front end.

I did find a question similar to this here:

https://toolset.com/forums/topic/adding-price-range-filter-to-a-view/

But our case is more complicated with the filter needing to check if ANY of the contents of three different fields fall within the chosen range. I understand this will require custom code in some form to accomplish.

Thanks in advance for any assistance you can provide.

#2862269

Minesh
Colaborador

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where I can see the view you added with filters and admin access details.

Setup one ride with test data and I will try to give you solution based on the selected filter option.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.