Skip Navigation

[Resolved] Filter years from… to…

This support ticket is created 4 years, 3 months ago. 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.

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

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by egidijusM 4 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2041565

I try to crate a view search filter and one of the filter criteria would be years from ... to ... Data would be taken from atributes.

Example here:
hidden link

My site here:
autotuktuk.com

#2041837
between-filter-example.png

Hi,

Thank you for contacting us and I'd be happy to assist.

To add a year-based search filter, you can add a number type custom field for saving a numeric "Year" value with your posts.

Next, in your view with the search form, you'll be able to add a search filter for this field, with the "between" operator, so that a minimum and maximum value can be specified, for the search criteria.
(example screenshot attached)

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2056311

Ok thank You, but how can I do it with existing taxonomies of my products? If I am creating new custom field, all years should be added again to each product. That's so much work 🙁