Use Query Block to show The Events Calendar Current Events

  • Image
    birdhousedigital

    Hi,
    I’m using The Events Calendar PRO and I want to use a GB Query Loop to show events that are currently happening. I can use a 3rd party TEC plugin for this but am trying to keep consistency across the site as much a possible, so a GB Query Loop would be preferable.

    Of course I can have the Query Loop filter by a ‘current events’ tag, but I wondered if there was an automated way to contain the output of a loop to events whose start date is today or prior and finish date is tomorrow or after?

    Many thanks.

  • Hi there,

    In theory, that should be possible, but it depends on how The Events Calendar stores the event date for each event.

    If the date is stored in a way that WP_Query can read it as a date/meta value, then it can work with the GB Query block. However, it would still require a custom PHP filter to modify that specific query so it only returns events for the desired date.

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