Controlling the display of Past Events

Home Forums Calendar Products Events Calendar PRO Controlling the display of Past Events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1531403
    Abby
    Participant

    I am working on a site for a theatre and gallery. We need to be able to show all our past events, however the organisation used a standard blog format prior to 2016. I therefore need to create a page which shows two years of TEC past events and also the previous blog posts.

    I realise that I can use a TEC shortcode to show past events by date, which works well until we come to the present time. It’s not practical to update the shortcode every week, but I need the page to show an up to date list of past events. In short I need either:

    A) A specific ‘past events’ shortcode
    B) A way to have the shortcode show a date range ending at [current-date] or similar
    C) A way to edit the content of the ‘past events’ page, as separate to the other TEC pages, so that I can simply add a grid of ‘other’ past events.

    Many thanks.

    #1531919
    Sky
    Keymaster

    Hi there!

    Thanks for reaching out! I will try to help with your questions.

    All of the calendar views have the “previous” and “next” navigation links. Clicking “previous” will show the last week/month etc.

    There is also a setting to show events in with your main blog feed. In Events > Settings > General > “Include events in main blog loop.” Users would be able to navigation back through the past events and posts just like a standard blog.

    Other than these two features, I’m not exactly clear what you are going for. Are you wanting a separate page where no current events can be accessed?

    Thanks,
    Sky

    #1532332
    Abby
    Participant

    Thank you. I am aware of the ability to view past events by using the ‘previous’ buttons but what I need is a ‘past events’ page that can show the TEC past events and to which I can add other content too.

    I note from going through your support pages that there are a number of requests for a way to specifically show Past events, with varying responses from the support team. Is there any hope of a past events shortcode in the future?

    Perhaps you could give me guide on how to alter the generic past events page? Which template to change or how to add extra content to this page only?

    Cheers,
    Abby

    #1532885
    Sky
    Keymaster

    Hi again!

    This is possible with some customization, but you would need to be comfortable working with PHP to be able to do it.

    To output a custom list of events, you can use “tribe_get_events()” and pass in a custom query. You can target the beginning and end dates that you want the events to fall between. Specifically for your needs, you could pass today’s date dynamically using PHP’s “date()” function into “end_date”.

    For more detailed information on using tribe_get_events(), see this knowledgebase article.

    But any template is going to ultimately use a query to get a list of events to output. So, you would need to replace the query in the template you wish to modify with your custom query. Or, add the code to a WordPress template to add it in with other content.

    You can read more about customizing the events templates at our Themer’s Guide.

    Hope that helps! Let me know if you have any more questions.

    Thanks,
    Sky

    #1549453
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Controlling the display of Past Events’ is closed to new replies.