Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter lee718

    (@lee718)

    Anyone got any insight on how to reverse the order? ASC and DESC are being ignored. I posted the link in my original post.
    This is a really important feature for my client and I need to resolve this issue. Thanks in advance.

    Hey there lee718. Thanks for the note here. Happy to take a look at this for you. Might this thread (http://tri.be/support/forums/topic/tribe_get_events-order-asc/) from the PRO forum be of value to you? Or have I misunderstood the goal here?

    Thread Starter lee718

    (@lee718)

    Thanks for your reply. Unfortunately I followed this post’s suggestion and tried changing to “past” both with ASC and DESC and it shows the past events only.

    What I want to do is show the upcoming events on the home page. I have it set to 5 and right now it’s showing oldest events instead of newest. I do not want to exclude old events from being displayed necessarily but future (more recent) events should be showing on top. These are the arguments I currently have:

    $all_events = tribe_get_events(array(
    'eventDisplay'=> 'Upcoming',
    'orderby' => 'EventStartDate',
    'order' => 'DESC',
    'posts_per_page'=> 5

    Thanks for taking a look.

    Hey lee718. Thanks for the follow-up; I’;m not sure about that code myself, but I can get Jonah from our team to take a look and try to point you in the right direction. No guarantees since this is somewhat more on the customization side, but if he can identify a quick solution he’ll definitely offer it up.

    Stay tuned and thanks for your patience so far.

    Thread Starter lee718

    (@lee718)

    Thanks. I look forward to your response.

    Hey lee718,

    Try changing it to this:

    $all_events = tribe_get_events(array(
    'eventDisplay'=> 'upcoming',
    'meta_key' => '_EventStartDate',
    'orderby' => '_EventStartDate',
    'order' => 'DESC',
    'posts_per_page'=> 5

    You need to include the meta_key arg when you want to sort by a custom field and you needed an underscore before EventStartDate.

    Does that help?

    Hey again lee718. Just wanted to check in here; did Jonah’s last comment help point you in the right direction?

    Hey Lee, since I haven’t heard back here I’m going to assume you got this sorted and will be marking the thread RESOLVED accordingly. Please let me know if you disagree.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: The Events Calendar] events calendar plugin chronological order’ is closed to new replies.