Home › Forums › Ticket Products › Event Tickets Plus › How to search for future events outside of current month in calendar view
- This topic has 3 replies, 2 voices, and was last updated 7 years, 10 months ago by
ugapresents.
-
AuthorPosts
-
May 15, 2018 at 9:19 am #1530852
ugapresents
ParticipantWhen I search for an event in my list view, I will get the correct result if the event is in the current month or if it’s three months from now.
However, if I search for an event in my calendar view, it will only return results for events in that current month. Is there a way to search for *all* upcoming events from the calendar view?I removed the ‘events from’ filter using the following code
add_filter( 'tribe-events-bar-filters', 'remove_search_from_bar', 1000, 1 ); function remove_search_from_bar( $filters ) { if ( isset( $filters['tribe-bar-date'] ) ) { unset( $filters['tribe-bar-date'] ); } return $filters; }When I added this, the list view search still works but the calendar view keyword search does not work at all any longer. I get the following console error: Uncaught TypeError: Cannot read property ‘length’ of undefined.
Is there a way to search for an event in the calendar view and get results for *all* upcoming events? Not just upcoming events in your current month.
May 16, 2018 at 1:41 am #1531426Andras
KeymasterHi ugapresents,
Thanks for reaching out to us!
I’m not sure if there is a straight solution for that. When you search on the month view, then the search will run by default on the visible month. If it doesn’t find it in the visible month, then it will not jump to that month automatically which has the event.
Is this the functionality you are looking for?
Cheers,
AndrasMay 16, 2018 at 5:58 am #1531581ugapresents
ParticipantYes, that’s the exact functionality I am looking for. Is that possible?
Thanks!
May 18, 2018 at 1:21 am #1533601Andras
KeymasterHi,
Before we go any further I would just like to point out that this essentially is a custom development task and so is outside of our stated scope of support.
A colleague was kind enough to take a look at this.
“… this code is a bit of a hack, it doesn’t work smoothly (in fact, can lead to db errors) but it shows that what I think they want is indeed possible. Would require some TLC to smooth it out, but it may serve as a starting point if nothing else.”
https://gist.github.com/barryhughes/65da2ae9ffcc99b88c42773a3248af16
I hope this helps you get started.
Cheers,
AndrasJune 9, 2018 at 9:35 am #1549924Support 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 ‘How to search for future events outside of current month in calendar view’ is closed to new replies.
