Sorting the events frontend

Home Forums Calendar Products Events Calendar PRO Sorting the events frontend

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1112565
    Morten
    Participant

    Hi,

    Is there a function to sort the events in a specific order on the frontend?

    I’d like to choose which are showing first.

    #1112679
    Josh
    Participant

    Hey Morten,

    Thanks for reaching out to us!

    You have a couple of options for this one! If you’d like to modify a specific view, you can use “pre_get_posts” and modify the order with the desired arguments there. Be sure to add “suppress_filtes => true” to the arguments as well so it ignores the event date ordering that we natural force on the events.

    You could also use “tribe_get_events” to build your own event lists. You’ll also need to add the suppress_filters option described above for this approach as well.

    Let me know if this helps.

    Thanks!

    #1112844
    Morten
    Participant

    Hi Josh,

    Thanks. I’d like to have the option in a page by a shortcode or similar, so i dont need to hard code it in a template everytime i’d like to switch one from another.

    Is that possible?

    Thanks in advance

    🙂

    #1113214
    Josh
    Participant

    Hey Morten,

    We don’t have anything like that built in. This is something that you could create your own shortcode for though. Rather than building the tribe_get_events queries in a template, you can build them into a shortcode. You could then take advantage of the shortcode attributes to quickly change the order.

    Let me know if this helps.

    Thanks!

    #1119164
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Sorting the events frontend’ is closed to new replies.