Home › Forums › Calendar Products › Events Calendar PRO › Mini Calendar not listing events chronologically
- This topic has 5 replies, 2 voices, and was last updated 11 years, 7 months ago by
Josh.
-
AuthorPosts
-
August 26, 2014 at 8:39 am #701618
Kathleen Lane
ParticipantHello,
I recently changed the mini event calendar to list events starting in October using this tutorial https://theeventscalendar.com/fast-forward-to-the-next-upcoming-event/. However, the list of events under the calendar are not appearing in chronological order. It looks like they are ordered by post date.
How do I get the events on the mini calendar to list chronologically?
Thanks,
Nathan
August 26, 2014 at 1:40 pm #702149Josh
ParticipantHey Nathan,
Thanks for reaching out!
Unfortunately I was unable to replicate the issue with the events displaying by post date rather than event date after completing the steps in the tutorial.
Do you mind posting the exact code you used for your site here as well as a link to where the mini calendar is being used on your site? This will help me narrow in on what may potentially be happening and help us get this resolved for you.
Thanks!
August 27, 2014 at 10:39 am #704403Kathleen Lane
ParticipantSure,
Here’s the website: http://www.aiabaltimore.org/committees/baltimore-architecture-month-2/
And here’s the code I used: https://gist.github.com/ndennies/8225a83ad47e30f04748
Thanks!
August 27, 2014 at 10:57 am #704434Josh
ParticipantHey,
Thanks for the links!
I checked out the site and it definitely looks like the events are displaying out of order. I tested the code you provided on my local install and found that the calendar displays events chronologically without regard to post date so I do not believe the issue is with the code you have used.
By chance, have you followed the steps in our testing for conflicts section? This can help to narrow down what may be causing the issue.
One additional thing we could try. I noticed that this widget area is within the content block. Was it added manually to the template? If so, you could try adding “wp_reset_postdata()” above the included widget area to ensure the previous loop isn’t interfering with the calendar.
Let me know if any of this helps. Sorry I wasn’t able to give you a direct solution but hopefully these suggestions will help to get this cleared up for you.
Thanks!
September 4, 2014 at 12:38 pm #722457Kathleen Lane
ParticipantJosh,
I tested it and figured out that the issue is chaging $start_date = date( ‘Y-m’ ); to $start_date = date( ‘2014-10’ );
My goal is to have a page where only events from October show because our October events are for a special promotion. I tried working around this by pasting the “fast forward” code as is and using a filter for my October events. However, the fast forward code seems to override the filter and any specifications I make when configuring the widget.
September 4, 2014 at 1:06 pm #722501Josh
ParticipantHello aiabaltimore,
That is strange. I’ve tested again with the code provided in the gist and it seems to work even with ‘2014-10’ set manually within the code.
Unfortunately, since this is a customization there isn’t a whole lot I am able to do for you here within the scope of support. One other thing that I would suggest though is that if you’re want to get the events of a specific month, you could run a custom WP_Query to get the desired events.
I’m sorry I’m not able to give you a direct answer but hopefully this helps. I’ll go ahead and close this ticket but if you have any further questions please don’t hesitate to open a new one.
Thanks!
-
AuthorPosts
- The topic ‘Mini Calendar not listing events chronologically’ is closed to new replies.
