We're merging with GenerateBlocks! Learn more here.

[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 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #31127
    Marcel
    Participant

    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,

    Marcel.

    #31130
    Marcel
    Participant

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

    #31178
    elvin
    Moderator

    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.

    #31191
    Marcel
    Participant

    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. ?>
    #31194
    Marcel
    Participant
    #31196
    Marcel
    Participant
    #31216
    elvin
    Moderator

    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.

    #31563
    Marcel
    Participant

    Hi Elvin,

    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.

    Regards,

    Marcel.

    #31582
    elvin
    Moderator

    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. 🙂

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