This support ticket is created 4 years, 8 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
Is there a similar example that we can see? Not that I can find. Basically, each class has a specific start date. I want to be able to filter by month to show all classes that start in March 2020 or April 2020, etc.
Hello. Thank you for contacting the Toolset support.
I would like to have more information here.
- Do you want to display both March and April classes or class posts belongs to single month of March?
- How the start date is added - is it added using the Types custom date field?
You need to add the custom field frontend filter using the custom values.
Can you please share problem URL and access details so I can setup the filter on your view and share the details with you about the resolution.
*** 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.
This way you can select the month and it will filter the results, If you agree, I will proceed to add the filter code.
In addition to that, I need to check against class start date and class end date and if both falls under the selected month only those posts should be displayed, correct?
So that's not really what I meant. I need it to show only the actual upcoming options. Can it not fetch the dates of upcoming classes and put the options like this?
March 2020
April 2020
I don't want it to show options that aren't available.
As I inform you in my previous reply that there is no native feature available to add month filter but as I said I can share workaround and that is why before I implement it I wanted to show you how it will look like.
As there is no such feature available, I see you only wants to add months to the dropdown which are currently available, its possible but require too much custom code which is beyond the scope of our support policy.
If you want, we can go with the workaround I shared, you may need to compromise with your requirement as it will not work how exactly you want or maybe you can add a custom taxonomy for months and month names as terms and add taxonomy filter and attach the month term with your posts while create/edit your posts.
I guess is that's my only option, then let's do it this way. I see the dropdown you created and see that it isn't functional yet. What do we need to do to make it work?
I made some visual changes to what you put in there. If we could just get that month dropdown working, that would be great.
You want to display all the classes:
- want to display posts having Class start date and end date both fall in a selected month?
- want to display posts having class start date falls in a selected month?
Because something class date start in January and ends ins February month. Please let me know how you want to display the posts and accordingly I will try to share workaround.