Mini Calendar not listing events chronologically

Home Forums Calendar Products Events Calendar PRO Mini Calendar not listing events chronologically

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #701618
    Kathleen Lane
    Participant

    Hello,

    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

    #702149
    Josh
    Participant

    Hey 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!

    #704403
    Kathleen Lane
    Participant
    #704434
    Josh
    Participant

    Hey,

    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!

    #722457
    Kathleen Lane
    Participant

    Josh,

    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.

    #722501
    Josh
    Participant

    Hello 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!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Mini Calendar not listing events chronologically’ is closed to new replies.