Home › Forums › Calendar Products › Events Calendar PRO › Have AJAX calendar use query parameters when navigating
- This topic has 3 replies, 1 voice, and was last updated 7 years, 1 month ago by Reece.
-
AuthorPosts
-
March 23, 2017 at 4:06 am #1258557ReeceParticipant
I am currently doing some custom filtering on the events page using some GET query parameters and the ‘pre_get_posts’ filter. This works well and filters out events from the main loop.
The only issue is; if I navigate the calendar, it uses AJAX to get the new view, but without applying my custom filters.
How can I pass this filter data to the AJAX request and ensure that the filters are still applied when the new view is loaded?
March 23, 2017 at 1:57 pm #1259054CliffMemberReece, thanks for your question.
I appreciate your question and the desire to customize it for your use. However, we cannot provide such in-depth customization help, per our Scope of Support / Terms.
Here are some quick ideas that might be helpful (but also might not):
- Write JS code that is triggered by the tribe_ev_ajaxStart event ( comments about it can be found in our JS files). Maybe using that would give you the opportunity to modify the value of TribeCalendar.ajaxurl
- Though hacky, maybe pure JS solution to just use the window beforeunload event.
If there’s a code snippet you’d like me to put some eyes on or something else I can help you with, please update this ticket or create a new ticket if it’s a separate issue.
Thank you very much for your understanding.
If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.
April 14, 2017 at 9:35 am #1270074Support DroidKeymasterHey 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 ‘Have AJAX calendar use query parameters when navigating’ is closed to new replies.