[Support request] The Events Calendar CPT is showing all events

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support The Events Calendar CPT is showing all events

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #31127

    Hi guys,

    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

    Kind regards,


    • This topic was modified 5 days, 13 hours ago by Marcel.

    BTW it also shows events that are not even published and thus planned for future publishing


    Hi Marcel,

    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.


    Hi Elvin,

    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. ?>
    • This reply was modified 1 day, 13 hours ago by Marcel.

    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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.