WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] events calendar plugin chronological order (9 posts)

  1. lee718
    Member
    Posted 1 year ago #

    I am having a problem showing my events in descending order, later ones on top. I have it set up so that 4 show on the home page with a link to "View all Events", but those on the home page need to be the ones happening later not sooner, and on the link page I would like the same thing, later on top and older/past events below.
    The link to the site is http://www.84web.org

    I have tried deactivating all my other plugins to try different things suggested here, but no luck:
    http://wordpress.org/support/topic/plugin-the-events-calendar-events-list-in-chronological-order?replies=49

    Thanks

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. lee718
    Member
    Posted 1 year ago #

    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.

  3. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    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?

  4. lee718
    Member
    Posted 1 year ago #

    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.

  5. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    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.

  6. lee718
    Member
    Posted 1 year ago #

    Thanks. I look forward to your response.

  7. jonahcoyote
    Member
    Posted 1 year ago #

    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?

  8. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

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

  9. roblagatta
    Modern Tribe Support
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic