markpanado
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Get Specific Events by IDsHi Jonah,
Thanks, It helps! 🙂
The problem is, it doesn’t include other fields for Events such as:
- Date
- Category
- Phone
- Venue
- Address
- Cost
Here is my code. It will only output the standard fields:
# consider that $id is not an array function mj_ajax_get_class($id){ $args = array( 'post_type' => 'tribe_events', 'include' => array($id), ); return get_posts($args); }What should I add to fetch the other fields specific to Events?
– Mark
Forum: Plugins
In reply to: [The Events Calendar] Showing upcoming events on Start date not durationHi Jonah,
Sure! 🙂 I’ll try to explain it as simple as I can. Here is what I did:
The setup:
- I’m working with a school website that offers short courses so I used the term “Class” or “Scholl Classes” as “Events”
- Originally, I have 2 sections of displayed “School Classes” as: “Upcoming Classes” and “Previous Classes”
- After the modification, I will have a new section as “Ongoing Classes”
- “Ongoing Classes” are simply pulled from “Upcoming Classes” which satisfy this condition: if($value->EventStartDate < date(‘Y-m-d’)) then stored in an array
The process:
- Get “Upcoming Classes” = tribe_get_events(“eventDisplay=upcoming”)
- In foreach loop: Did the “Upcoming Class” satisfy this condition? ($value->EventStartDate < date(‘Y-m-d’)) If yes, then don’t display it then store it in an array. Else, display it.
- Once the loop is done, you’ll now have the entries for “Ongoing Classes”
That’s it. Hope I didn’t confuse you. hehe
Thanks,
– MarkHi jonahcoyote,
Thanks for your reply. I already found an alternative solution and able to modify sorting of events. Live preview: http://enderunextension.com/
Thanks,
– MarkForum: Plugins
In reply to: [The Events Calendar] Showing upcoming events on Start date not durationHi jonahcoyote,
Thanks for your reply. I already found an alternative solution and able to modify sorting of events. Live preview: http://enderunextension.com/
Thanks,
– MarkForum: Plugins
In reply to: [The Events Calendar] Showing upcoming events on Start date not durationThis is also my problem: http://ww.wp.xz.cn/support/topic/exclude-events-with-past-start-dates-on-upcoming-events-from-tribe_get_events
Is there a way we can modify the query inside tribe_get_start_date() so it will only recognize the start dates?