Home › Toolset Professional Support › [Resolved] Is the use of fields from The Events Calendar plugin possible?
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 | - |
Supporter timezone: Asia/Kolkata (GMT+05:30)
This topic contains 9 replies, has 2 voices.
Last updated by lesleeM 2 years, 1 month ago.
Assisted by: Minesh.
We have a content type called Rides which is provided by The Events Calendar plugin. We've added a custom field group to Rides using Toolset to allow us to have additional data than what is provided in The Events Calendar. We do see that The Events Calendar Pro also allows for custom fields, but we're currently trying this with Toolset hoping we don't reach a dead end.
We would like to set up a View in Toolset to display all Rides and to have various filters. Some of the filters will be on fields defined through The Events Calendar. For example, the City field is defined among the Location fields in their system. But we have also added a custom field named County that we'd also like to use as a filter. I know how to set up County as a field to filter on, but I'm not seeing any way to set up City as a field to filter on. Is it possible to use The Events Calendar fields in Toolset?
Also, we'd like to set up this View to order Rides by the date of the ride. That is another field supplied by The Events Calendar. I'm not seeing any way to order the display by date of the ride.
I know one solution is to just eliminate The Events Calendar entirely, and then build our own Rides content type through Toolset and then set up ALL of the fields that reside in The Events Calendar into our custom Field Group in Toolset. If we do this, we'll be able to do all we want to do, but we'll lose all the functionality that The Events Calendar has already built. We'd have to emulate this by rebuilding it in Toolset. But if there is a way to pull field data from The Events Calendar for use in Toolset, that would give us the best of both worlds. Please advise on what is doable here, if anything.
Hello. Thank you for contacting the Toolset support.
Well, you can filter view with event calendar custom fields but it may require custom code as the event calendar use different field formate.
For example, please check the following related ticket:
- https://toolset.com/de/forums/topic/how-to-sort-by-date-with-pro-event-calendar/
- https://toolset.com/forums/topic/filter-date-from-the-events-calendar/#post-446109
- https://toolset.com/forums/topic/views-and-event-calendar-pro-date-offset-how-show-events-from-today/
So, first of all I will require to check how event calendar stores the data for city field and then I will be able to guide you in the right direction.
Can you please share problem URL where you added your view and tell me for what event calendar fields you want to add as the view filter?
*** 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'm on Edit post of single ride post here:
- hidden link
Do you mean that you want to add the filter for the Location section field "Ride Start"?
LOCATION
Ride Start:
Just to clarify, nothing is needed to be changed on the Edit Ride page. I'm assuming that you're just asking to clarify that is the correct field. If so, yes that Ride Start field is one of the ones we want to have available to set up as a filter.
If you look at the current Rides by Date page here:
hidden link
You'll see that we have filters already set up for the fields supplied by Toolset's Field Group for Rides (County and Ride Categories). What we need is to also add filters on the fields provided by The Events Calendar.
On that Edit Ride page, you can see where the needed fields are defined as follows:
All four of these fields are defined within the section on the Edit Ride page that says The Events Calendar
1) Event Start Date/Time - The first field within The Events Calendar section says:
TIME & DATE
Start/End
That's what we need to use as a filter on the Rides By Date page and we need the sort order on the Rides By Date page to use this field instead of Post Date.
2) City - On the Edit Ride page you're looking at, if you see where it says "Ride Start:" and that is defined as Mead Botanical Garden. If you click the link that says Edit Ride Start, it will take you to the Edit Ride Start page for Mead Botanical Garden. On that page, you'll see the City field as the second item under Ride Start Information. We need that one to be a filter on the Rides By Date page as well. We'd ideally like a filter that shows all the available Cities in a dropdown in the same way the Ride Categories filter currently works, preferably automatically generated from the available options, or manually defined if necessary.
3) Event Start Location - In this example that would be Mead Botanical Garden. We'd ideally like a filter that shows all the available Start Locations in a dropdown in the same way the Ride Categories filter currently works, preferably automatically generated from the available options, or manually defined if necessary.
4) Event Contact - That can be seen as the next section under Location on the Edit Ride page. On the Edit Ride page you're looking at, if you see where it says "Ride Contact" and the name in there is Walk Jones. That's what we need to be another filter on the Rides By Date page as well. We'd ideally like a filter that show all the available Ride Contacts in a dropdown in the same way the Ride Categories filter currently works, preferably automatically generated from the available options, or manually defined if necessary.
Let me know if you need any further clarification. Basically, we just need those fields from The Events Calendar to be ones we can use as filters in a View.
If you can do one of the four for me to show me how it is done, I could try to apply what you do to accomplish the other three, if you can let me know what I'd need to change from your example if that change isn't something obvious. If I can do the other three, that would make this take a lot less time on your end.
The thing is that non of the field we can use as frontend filer as how Events calendar stores data is different way and the post type to which it stores is seems also private.
For example, The "Ride Starts" is stored as separate post type "tribe_venue".
If you still really want to add all those fields as frontend filter then first you will have to create custom fields using Toolset and then you should make sure that when you save/update the "Ride" post those fields value like (City, Ride Start, etc,,etc,,) should be copy to the fields you created using Toolset and then you can add those fields as frontend filter.
I understand what you're saying about City, Start Location and Contact. I see that they are stored as content types separate from the rides.
Is there a way to automate saving the data entered into those fields and copying it to the new Toolset fields that will have to be created? If we can set this up to where we only have to enter the data once, that would be OK. But if we have to enter the data twice, once in The Events Calendar fields and once in the corresponding Toolset fields, that wouldn't be ideal. We'd probably opt for trying The Events Calendar Pro plugin at that point. But then we still wouldn't be able to use Toolset for various Views and have all desired fields like I was hoping to achieve.
As for the date field, is that one not doable too? That one is stored with the ride as far as I can tell and we really need the view to sort on the ride date, not the post date. If we can't do that, then I'm thinking have to do one of two things:
1) Scrap the idea of using Toolset to set up various ride displays.
or
2) Scrap the idea of using The Events Calendar at all and set up all fields currently run through The Events Calendar in Toolset instead.
I'm not sure which would be the better approach there as there are pros and cons both ways. Toolset gives more flexibility, but The Events Calendar has a whole bunch of features/displays already built and designed to look very nice. That's why I was trying to get the best of both worlds here so I wouldn't have to make that choice and could take advantage of the pros of both.
Let me know if there's any way to automate copying the data from The Events Calendar fields into corresponding custom Toolset fields and we'll decide what to do from there. Thanks for looking at it for us.
If there's any way you can build integration with The Events Calendar into Toolset as you have with a lot of Woocommerce features, that would be fantastic and something that I think would help attract more people to your plugin. So again, consider this a feature request for down the road if you agree that it would be a good idea.
Is there a way to automate saving the data entered into those fields and copying it to the new Toolset fields that will have to be created? If we can set this up to where we only have to enter the data once, that would be OK. But if we have to enter the data twice, once in The Events Calendar fields and once in the corresponding Toolset fields, that wouldn't be ideal. We'd probably opt for trying The Events Calendar Pro plugin at that point. But then we still wouldn't be able to use Toolset for various Views and have all desired fields like I was hoping to achieve.
==>
Well, you can use the popular native WordPress hook "save_post" to update the custom fields you created using Toolset when you create/update post. You will have to get the values stores in to the Event calendar fields and copy its value to the fields you created using Toolset Types.
More info:
- https://toolset.com/documentation/customizing-sites-using-php/updating-types-fields-using-php/
As for the date field, is that one not doable too? That one is stored with the ride as far as I can tell and we really need the view to sort on the ride date, not the post date.
==>
Yes, you can not add the frontend filter using any of the Event Calendar fields.
OK, I'm trying to set everything up exclusively in Toolset now and will see how far I can get with functionality.
The client I'm building this for has said they'd be OK with entering field data twice, so it is still possible that we can use Toolset and The Events Calendar together that way.
Do you think there's any chance you'll decide to build in full integration with The Events Calendar? Should I similarly contact The Events Calendar to ask them if they will build in integration with Toolset in a way that would allow their fields to be fully used with your plugin?
There is no plan yet to make The Events Calendar fully integrated with Toolset yet.
My issue is resolved now. Thank you!