Home › Forums › Calendar Products › Events Calendar PRO › Using [tribe_event_inline] to show past events
- This topic has 7 replies, 4 voices, and was last updated 9 years, 1 month ago by
Amiel.
-
AuthorPosts
-
March 6, 2017 at 11:38 am #1250033
Amiel
ParticipantDear support team,
I’m playing around with the new [tribe_event_inline] short code feature and it is awesome!
I’m looking for a way to use this short-code to show past event.
I followed the list of variables at this knowledge-base https://theeventscalendar.com/knowledgebase/embedding-single-events-tribe_event_inline-shortcode/ but I didn’t find a variable for (past event VS upcoming events)
Am I overlooking a variable for displaying past event with [tribe_event_inline] short-code?
If there is no such variable, would you be able to help me find a way to display past event with this short-code method?Many thanks in advance,
AmielMarch 6, 2017 at 5:06 pm #1250147George
ParticipantHey Amiel,
Thanks for reaching out. You only specify one event with the shortcode, so whether that event is in the past or future it shouldn’t matter. Just use the Post ID of the event and that event should be rendered via the shortcode without issue.
Can you specify what trouble you’re having here? Copy the exact of a version of the shortcode that is failing for you and paste that text here.
Thanks!
GeorgeMarch 7, 2017 at 6:07 am #1250373Amiel
ParticipantHello George,
First of all, thank you very much for your fast reply!
I now realize that the [tribe_event_inline] shortcode can display any type of event (either past or upcoming). It seems that my problem is rather more specific into the implementation of the code in particular circumstances. I thought it would be much much easier to explain what I’m looking for by using a short video.Here is the link to the screen-cast that demonstrate the issue I’m facing with: http://d.pr/v/QfYk
Many thanks in advance,
I highly appreciate your support,
AmielMarch 7, 2017 at 10:43 am #1250678George
ParticipantThank you for the video.
The loop you’re using is made by the “Tool set” plugin you’re using, not our own plugins, so you may need to contact the “Toolset” plugin developers for assistance with modifying their loop.
Getting past events is tricky — you would need to add a meta query to the loop that looks for the _EventStartDate or _EventEndDate meta keys on events, and then filters the query results by these meta keys.
So, I would recommend contacting the Toolset plugin developers with this question:
- How can I set up my loop with your plugin so that it queries for custom post types based on a meta field’s key and value?
- Once they provide this information, try to add a meta query that looks for events within a certain range of dates. This seems to be the best way to ensure your loop pulls in past events and upcoming events.
Does this information help you move forward with this project?
— George
March 10, 2017 at 7:24 am #1252320Amiel
ParticipantHello George,
I was out of the office for few days and I apologize for my late reply.
Thank you so much for your elaborated answer and for your kind explanation – really amazing support!
Your reply absolutely helped to convey this issue further; and thank you for phrasing the concise clear question with the professional nomenclature.I have contacted the wp-types and I’m citing their support team reply:
Here is what I found, the “the-events-calendar” stores the custom fields “_EventStartDate” and “_EventEndDate” as string values, for example:
_EventStartDate: 2017-03-06 00:00:00
_EventEndDate: 2017-03-07 23:59:59You can check it in your database
But the date filter of Views plugin only works for the custom date field created by Types plugin, which stores custom date field value as time-stamp value, so it is not possible to achieve what you want withing Views plugin.
As far as I understand, apparently there is no way to use the loop for calling events based on the “_EventStartDate” custom field of the ‘The Event Calendar Pro’ plugin.
Is there an easy way to implement some code modification in ‘The Event Calendar Pro’ Plugin to make it work together? I assume it require a php modification but I’m not sure how to approach it.
Many thanks for you kind help! I highly appreciate it,
AmielMarch 10, 2017 at 8:12 am #1252355George
ParticipantHey Amiel,
It does indeed sound like further PHP code customizing is required. This is unfortunately something we are not able to help with, as elaborated upon here: https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/
We are not able to help with modifying the look or behavior of our plugins, as elaborated upon in the article above (please read that article).
So to implement any sort of custom features like you want here, you would have to write that custom code yourself or hire a professional developer to do it for you. We have a list of great developers here → http://m.tri.be/18k1 (and have no affiliation with any of these folks—they’re simply some well-respected names in the community that we’ve compiled to share in situations like this one).
I am sorry if you were hoping we could write custom code for you, but I hope this information helps you proceed with your issues nonetheless.
Sincerely,
GeorgeApril 1, 2017 at 9:35 am #1263001Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Using [tribe_event_inline] to show past events’ is closed to new replies.
