Tagged: the events calendar tec
June 11, 2021 at 12:45 am #31127
I really would like to use WPSP Pro to show our current events from The Events Calendar (TEC), it does show with this shortcode a list
[wp_show_posts id="18363" settings="orderby=start_date&order=DEC"]but it shows all our hundreds events and it should only show events where the end date is not passed.
Is there a way to do this?
By the way TEC build-in shortcodes to show events is visually terrible, therefor you can find lots of third party plugins all trying to earn some money but at the end I discovered our true and only WPSP Pro is doing it at it’s best!!
Keep up the good work
Marcel.June 11, 2021 at 12:53 am #31130
BTW it also shows events that are not even published and thus planned for future publishingJune 13, 2021 at 8:16 pm #31178
This is quite tricky to do.
Does the events calendar plugin have any meta key that stores true or false if the end date has passed?
If it has one, we can use that meta value for filtering query results.
You can try asking TEC’s plugin developer for this. If they have one, we can use that for filtering things out.June 15, 2021 at 12:42 am #31191
after searching and looking into their php templates I guess the code below might be for “filtering” only events according to the settings in the plugin, how can we use this in WPSP?
$posts = tribe_get_list_widget_events(); <?php if ( $posts ) : // Check if any event posts are found. ?>June 15, 2021 at 12:51 am #31194June 15, 2021 at 12:57 am #31196June 15, 2021 at 6:47 pm #31216
That snippet only checks if any event posts are found.
What we need to get is the meta value that stores if an event has passed.
This is quite complex, and to be honest, goes way out of the scope of support of the plugin because we’re basically integrating another unaffiliated third-party plugin to WP Show Posts.
This is complex because of the FF:
– We have to fetch the event end date of the event.
– After fetching the end date, we need to compare the end date to the current date to see if the event has passed.
– After making the true/false comparison, we need to build the query that only gets the posts that return true/false depending on the condition.
I did a bit of digging around and I found this function –
tribe_is_past_event()– which checks that.
You can try assigning the true/false value of this to a meta field and then do a meta query for this.June 29, 2021 at 12:34 am #31563
thanks for your effort.
After many many many hours of rebuilding an existing Avada-themed website from ground up with GP-P and WPSP-P I gave up because of this ‘not out of the box’ integration with TEC. I really think it’s a ‘missed change’ for you guys to have not an integration with the most used calendar/ticketing plug-in from the WordPress plugin repository.
Hopefully in the future there will be an integration. Nevertheless I just extended my Pro license with one year simply because you have a smart product.
Marcel.June 29, 2021 at 4:53 pm #31582
This is a niche feature to have but yeah, It’d be nice to have something like this.
As for this being added in the future:
It’s uncertain for now as the priority on WPSP roadmap is turning it into a block, possibly, a merge w/ GB. 😀
No problem. 🙂
- You must be logged in to reply to this topic.