Display past events on organizer's and venue's pages

Home Forums Calendar Products Events Calendar PRO Display past events on organizer's and venue's pages

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1328370
    Leander Wattig
    Participant

    Hi everybody,

    I’m a strong user of The Events Calendar and I’m already above 1,000 events in the database this year. Naturally, most pages of venues and organizers are empty since currently there are no upcoming events. Therefore, I’d like to show the past events there to show what good they have done (and will do).

    How do I accomplish that?

    Thanks and best,
    Leander

    #1329757
    Victor
    Keymaster

    Hello Leander!

    I’d be happy to help you with that.

    You could achieve something like that by customizing the single-venue.php and single-organizer.php files located at /wp-content/plugins/events-calendar-pro/src/views/pro/

    You could make a template override of those templates by following the steps provided in our themer’s guide > https://theeventscalendar.com/knowledgebase/themers-guide/

    I hope it helps! Let me know if you have other questions.

    Best,
    Victor

    #1329930
    Leander Wattig
    Participant

    Hi Victor,

    Thanks! Do you maybe have the line of code which I can use there then to get the past events into the venue’s and locations’ pages via template override?

    Thanks and best,
    Leander

    #1330552
    Victor
    Keymaster

    Hey Leander!

    I’ve just taken a look at both templates and they seem to be different customizations for each of them. I’m not sure how hard this would be, but I will have to dig a little deeper to come up with a working code.

    While we cannot help with custom coding, I will try to get something working here, but we’re busy at the moment so it may take me until tomorrow or beyond.

    I hope you can understand and your patience would be highly appreciated 🙂

    Thanks,
    Victor

    #1330586
    Leander Wattig
    Participant

    Hi Victor,

    I fully understand that you can’t provide custom coding but a hint into the structure would be great. I’m not a coder but tried to look into it and have no idea how to get past events out of the system at all. I found an old forum’s posting concerning that but the code seems to have changed.
    (https://theeventscalendar.com/support/forums/topic/upcoming-and-past-events-on-single-venue-page/ &
    https://theeventscalendar.com/support/forums/topic/display-past-events-on-organizers-page/)

    Thanks so much
    Leander

    #1331511
    Victor
    Keymaster

    Hello Leander!

    Using the linked threads I managed to come up with some working snippets.

    Try the following code in your single-venue.php template override:

    // First show upcoming events
    echo tribe_venue_upcoming_events( $venue_id, $wp_query->query_vars );
    // and then those from the past
    echo tribe_include_view_list( array(
    'venue' => $venue_id,
    'eventDisplay' => 'past'
    ) );

    The next one is for the single-organizer.php template file:

    echo tribe_organizer_upcoming_events( $organizer_id );
    // Past events
    echo tribe_include_view_list( array(
    'organizer' => $organizer_id,
    'eventDisplay' => 'past'
    ) );

    Let me know if that works for you 🙂

    Best,
    Victor

    #1332441
    Leander Wattig
    Participant

    Hi Victor,

    Thank you so much – this works great. I adjusted it a little further and have it integrated now on orbanism.com which is cool because now there aren’t most venue and event organizer pages empty anymore. We curate the event picks so it’s even interesting afterwards.

    Thanks and best,
    Leander

    #1332592
    Victor
    Keymaster

    Hey Leander!

    I’m super glad it worked out for you that way! Thanks for following up to let us know about it.

    I’ll close this now, but feel free to open a new topic if anything comes up and I’d be happy to help 🙂

    Cheers!
    Victor

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Display past events on organizer's and venue's pages’ is closed to new replies.