Home › Forums › Calendar Products › Events Calendar PRO › calendar widget – fast forward code problem and solution
- This topic has 3 replies, 2 voices, and was last updated 9 years, 7 months ago by Brook.
-
AuthorPosts
-
September 14, 2014 at 1:41 pm #743904zerocoolParticipant
regarding this tutorial https://theeventscalendar.com/fast-forward-to-the-next-upcoming-event/
I was having a problem with the calendar grid fast forwarding to the next upcoming date, but the list of events that comes after was showing the first events i ever posted (which was 2013) …
finally found the fix – find this line:
remove_action( ‘parse_query’, array( $this, ‘amend_list_query’ ) ); // Run this once only
and comment it out
//remove_action( ‘parse_query’, array( $this, ‘amend_list_query’ ) ); // Run this once only
notice the comment says to run only once? i guess this meant only the calendar grid was advanced, but the list wasn’t? am i correct on this, is there anyway someone can confirm that this is the proper solution?
September 15, 2014 at 10:36 pm #745844BrookParticipantHowdy zerocool,
That is interesting. The code you referenced only runs once because it is not intended to affect other tribe queries like those on Event List page. But, it sounds like for you it was affecting multiple queries by accident.
I am not 100% sure I follow what the problem is. Could you pleasae take a screenshot of “the list of events that comes after”, the one which was showing events from 2013? I want to be 100% sure I understand you. Then maybe I can recreate the problem and submit a patch to our snippet.
Thanks for bringing this up! Once we get on the same page I hope to answer your question in detail.
– Brook
September 18, 2014 at 10:27 am #750975zerocoolParticipantsorry, almost forgot that you replied.
you can find the screenshot here https://www.dropbox.com/s/jhhyuij2ffziwlg/screenshot.jpg?dl=0
the site in question is pcbeachspringbreak.com, about midway down the home page.
obviously, the screenshot shows a slight difference in layout (the new version has thumbnails) … but i did the layout changes after i fixed the function. I replicated the problem and fixed it in the exact same way on another site too.
September 18, 2014 at 11:07 am #751096BrookParticipantWow! Thank you for sharing that. Super detailed.
I will keep this in mind for the future. If other people are facing a problem I will certainly share your solution. Much appreciated!
– Brook
-
AuthorPosts
- The topic ‘calendar widget – fast forward code problem and solution’ is closed to new replies.