Past Events view not working

Home Forums Calendar Products Events Calendar PRO Past Events view not working

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1001046
    codeink
    Participant

    I’m trying to show a calendar with the past events. I found that it can be accessed with the following URL:
    http://mywebsite.com/events/?tribe_event_display=past

    But it doesn’t seem to be working? It takes me to the current month calendar.

    #1001358
    George
    Participant

    Hey @codeink,

    Sorry you’re having trouble with that!

    Can you first share your system information with us? Here’s how to do so → https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Next, can you clarify what your current settings are in “Settings > Permalinks” in your wp-admin? Next, try going to Settings > Permalinks in your admin area, and just click “Save Changes” without actually making any changes – this may seem like an odd thing to do but is a little “trick” within WordPress to get the permalinks across your site to refresh, which might help here.

    We can continue troubleshooting from here based on what you find in the step above and what your system information reveals about your site.

    Thank you!
    George

    #1001497
    codeink
    Participant

    This reply is private.

    #1001826
    George
    Participant

    Hey @codeink,

    Thanks a ton for trying that Permalinks trick and for sharing your site information here.

    Unfortunately, I was unable to spot anything problematic in your System Information, which means that there could be a code conflict at play here.

    Before we dive into more troubleshooting steps, can you just clarify what exactly you’re trying to do here?

    You describe your issue as this:

    I’m trying to show a calendar with the past events.

    What does this mean? Do you mean that your “Previous Events” links do not work, for example?

    Do you mean that you’re trying to build a separate calendar that only shows events in the past?

    Does your main /events/ view not even work for you?

    Just curious about this and trying to get a better understanding of your issues!

    I really appreciate your patience here.

    Thank you,
    George

    #1002065
    codeink
    Participant

    Hi George, thanks for your help! I’m just trying to show a list (ideally) of past events, broken down by the month. Like:

    August 2015:
    – Event name on August 18th at Event Location
    – Event name on August 9th at Event Location

    July 2015:
    – Event name on July 27th at Event Location
    – Event name on July 4th at Event Location

    The main /events/ works perfect.

    Thanks!

    #1002921
    George
    Participant

    Thank you for your patience so far with this, @codeink – with the thread in a general sense, and just over this past three-day holiday weekend specifically!

    I appreciate your clarification of things, and am glad to hear that the main /events/ page is working fine – with that in mind, then, there’s no need to jump to the conclusion of code conflicts here which is good news 🙂

    If you’re trying to build a list like the one you describe, a sort of “Archive View” of past events, then there’s good news and bad news here. The good news is that, even though the URL you pasted in your first post for this thread doesn’t bring you to the sort of view you’d like, you can still rather easily get a list of “past” events by using some custom code; namely the tribe_get_events() function.

    The “bad” news, in a way, is that pulling off a custom view like you want requires a decent amount of code customization, which is bad news in two ways: 1. It’s extra work, and nobody likes that 🙂 and 2. We can’t really help with customizations here, and can only offer general advice and perhaps some quick code examples.

    To give you an idea of what making a custom view like you want here would entail, here two example ways to display past events that I can think of:

    Just using tribe_get_events()
    The simplest method is to just use all the existing page templates and such in your theme, and add the tribe_get_events() function manually somewhere where you’d like your past events to display. Then you’d just write out a query or queries for past events (by month or something, et. cetera) and loop through the results to display the title of the event, date, and location. To learn how to use tribe_get_events() in this way, check out this knowledgebase article: https://theeventscalendar.com/knowledgebase/using-tribe_get_events/

    Modifying an Existing Events Template
    The Events Calendar’s templates are wholly customizable, and so one option here is to use its customization system to just simplify something like the “List View” template. An example of that would be to display the normal views for current and upcoming events, but then if folks page backwards into “past events”, you could display just a simpler list of events that, based on your example, just shows title, date, and location. You could check for whether an event is in the past or not using the aptly named tribe_is_past() conditional function.

    To learn about customizing The Events Calendar template files, check out our article on the subject here → https://theeventscalendar.com/knowledgebase/themers-guide/

    <hr>

    These are just some examples of how to go about creating the sort of custom display you’re hoping to create. I hope all this is information is helpful – let me know if that’s the case, or if you have any further questions.

    Thank you!
    George

    #1007806
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Past Events view not working’ is closed to new replies.