Hi,
Hope you are well.
I have a form with a view displaying custom posts, it has 2 filters currently.
1. Type of post selected from drop-down ie. 1 or 2 or 3
2. Date in post selected with date pickers.
I need to add buttons to quick-filter the Date field. ie. Open Posts and Closed Posts
Basically something like this:
Closed Posts = Between Min_date(01/01/2000) and Max_date(Yesterday)
and
Open Posts = Between Between Min_date(Today) and Max_date(01/01/2100)
Hello. Thank you for contacting the Toolset support.
It will be possible but it will require some custom code and we have to use the View's filter hook "wpv_filter_query" in order to adjust the view's query argument on fly.
If you can share details where on what page with what view you want to implement this I would be happy to share the solution.
*** 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.
I see on your site I do not have permission to edit the files that is why I could not able to add custom code snippet at "Custom code" section offered by Toolset:
- hidden link
It shows following messsage:
Unfortunately, this snippet cannot be edited directly. Check file permissions and wp-config.php constants DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS. Alternatively, you can edit the file manually.
Can you please grant me permission so that I should be able to add the "wpf_filter_query" filter.
I've added the following filter code that will help you to filter by Close and Open radio button to the "Custom Code" section offered by Toolset.
=> hidden link