[Resolved] Filter products by years between to values of select boxes.
The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
If there is anyway to do that through the Types settings, please let me know, I've spend so much time on searching, and the only solution I found is to do it dynamically through PHP (wpt_field_options).
The issue with this is that since the field was not populated through types then there isn't any record of it in the database to compare to whats on the CPT.
The only other option is to manually add the values to the filters to compare to .
Unfortunately I'm not able to assist with the custom code for this, however instead of using select fields why not use a single line field and allow the user to enter the year value in an example format that you will set.
This will allow you to use a select value on the frontend to perform the search without having the manually populate all the dates yourself.
Thanks,
Shane
The forum ‘Types Community Support’ is closed to new topics and replies.