Home › Forums › Calendar Products › Events Calendar PRO › Retrieve non-expired events
- This topic has 4 replies, 2 voices, and was last updated 11 years, 2 months ago by
Brian.
-
AuthorPosts
-
January 23, 2015 at 7:42 am #936724
papertower
ParticipantGreetings!
I’m trying to find the best way to retrieve all the events that aren’t expired. I found the tribe_get_events function, but it doesn’t do anything get_posts doesn’t aside from setting the post type. I could do a meta_query on _EventStartDate, but I only know that from looking in the database. I’d really prefer your plugin doing that in the case you decide to change the meta key any time down the road.
Now.. I have to be honest. My team and I use The Events Calendar on various projects when an event system is needed. As a drag-n-drop plugin, it works pretty well. But as a developer, I always dread working with it. If all we want to do is drop it in place, select which features to use, and style it to our needs, it works fine. But anything outside of that, and it’s incredibly frustrating. Why do the technical docs show deprecated functions for the first 8 or so pages? It takes less time to just go through your code and find stuff that way. The plugin feels like it hugely caters to the non-developer crowd, giving us devs the short end of the stick. Sorry for the frustration, but I’ve worked with this plugin on many projects now and inevitably feel this way.
Thanks so much for your time!
~Jason
January 23, 2015 at 8:50 am #936773Brian
MemberHi Jason,
Sorry for the frustrations I totally get that as both a developer myself and someone that supports the Events Calendar.
First to answer you question.
If you use this in your query:
eventDisplay
You can set the value to:
list
So something like this:
'eventDisplay' => 'list'That will show only upcoming events.
It is also takes all and past too.
We have this document that gives some examples as well:
Technical Documents
I get your point about the technical documents. Showing so many deprecated functions, that is not very useful at all. I will bring up about filtering those out to make that more useful.We are also working on upgrading all our technical documents now they we have the new site up and feedback such as yours is helpful for us to improve them. So I will bring it up with the team and seeing about getting it improved.
Let me know if you have any follow up questions.
Thanks
January 29, 2015 at 7:23 am #938798papertower
ParticipantGot it. I see what that does in tribe-event-query-class.php. Thanks!
I’m having an issue now wherein, in the events, I only want the first event for recurring events.
January 29, 2015 at 7:33 am #938805Brian
MemberIs this related to the previous posts?
I’m having an issue now wherein, in the events, I only want the first event for recurring events.
Not sure what context you are referring to.
Let me know and I can try to help out.
Thanks
February 19, 2015 at 8:13 am #943679Brian
MemberI am going to close this topic as we typically close threads if there is no activity after two weeks. Feel free to create a new thread and reference this one to save you time.
Thanks
-
AuthorPosts
- The topic ‘Retrieve non-expired events’ is closed to new replies.
