Can View More Link Jump to First Event?

Home Forums Calendar Products Events Calendar PRO Can View More Link Jump to First Event?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1359997
    Sam George
    Participant

    I am using the Events Calendar Pro Advanced Event List Widget to display Upcoming Events from a specific category. All of the events in that category are in May 2018. I have my default view set to “Month”. When I click the View More link at the bottom of the widget, it takes me to the October 2017 view, not the month with the events in it (May 2018). This requires that you page forward many months to May before you can see any of the events listed.

    Is it possible to make the View More link for the Events List widget jump to the first month with an event in it when looking at it in Month View?

    #1361037
    Jennifer
    Keymaster

    Hi Sam,

    Thanks for reaching out! You can change the link with a customization of the list-widget.php template, found at wp-content/plugins/the-events-calendar/src/views/widgets/list-widget.php (line 112). You can copy that template into your child theme by following these instructions and then edit it there.

    Let me know how that works for you and if you have any questions!

    Thanks,

    Jennifer

    #1361089
    Sam George
    Participant

    Hello, and thanks for the response!

    I am already aware of how to modify Calendar templates, so all good there, though I am using the PRO version of the widget, so I believe that correct template to alter would be:

    wp-content/plugins/events-calendar-pro/src/views/pro/widgets/list-widget.php

    However, I am still unsure whether it is possible and if so, how to alter the View More link within the list-widget.php template once copied into the tribe-events folder so that it will jump to the first available event returned.

    #1361097
    Sam George
    Participant

    If it helps, I discovered this widget you created that does a similar thing for the Mini-Calendar widget, but since the code is specific to that widget, I can’t repurpose it for the link I am attempting to alter.

    https://theeventscalendar.com/knowledgebase/fast-forward-list-widget-to-next-upcoming-event/

    #1362519
    Jennifer
    Keymaster

    Hi Sam,

    There are a few ways that you can do it, but the simplest method would be to alter line 58 (in the Pro template that you found – sorry for the confusion there!) and add the month to the end of the link:

    " rel="bookmark">

    This will make the link jump to that month on the calendar. You could customize the link to jump to the next month that has events (instead of hard-coding the date), but this would require a bit more code. We are limited in the amount of support that we can provide for customizations, but if you want to give this a try and have any questions on it, I’ll be happy to point you in the right direction!

    Let me know how this works for you!

    Thanks,
    Jennifer

    #1374728
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Can View More Link Jump to First Event?’ is closed to new replies.