Home › Forums › Calendar Products › Events Calendar PRO › Can View More Link Jump to First Event?
- This topic has 6 replies, 2 voices, and was last updated 8 years, 6 months ago by
Sam George.
-
AuthorPosts
-
October 5, 2017 at 2:43 pm #1359997
Sam George
ParticipantI 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?
October 9, 2017 at 3:42 am #1361037Jennifer
KeymasterHi 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
October 9, 2017 at 7:19 am #1361089Sam George
ParticipantHello, 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.
October 9, 2017 at 7:33 am #1361097Sam George
ParticipantIf 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/
October 12, 2017 at 6:15 am #1362519Jennifer
KeymasterHi 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:
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,
JenniferNovember 3, 2017 at 9:35 am #1374728Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Can View More Link Jump to First Event?’ is closed to new replies.
