Ordering Events

Home Forums Calendar Products Events Calendar PRO Ordering Events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45824
    Mike
    Participant

    On days with several events I need to list the event with a different priority than just alphabetical – I can see that if we quote the event
    “xmas party” it comes to the top but is there a less obvious way so that my contributors can’t influence the order.

    #45860
    Jonah
    Participant

    Hi Mike,

    The Events List page should always be ordering events by date ascending (closest to oldest). Is this another list you are asking about? How exactly would you want to highlight these events with higher priority?

    #45929
    Mike
    Participant

    Hi Jonah, thanks for your response – I’m looking at calendar view (rather than list view) when we might have several events on the same day. They will appear alphabetically by event name. I’d sometimes like to place the major event of the day at the top of that day’s box. Failing that maybe to highlight it in some way.
    Best wishes
    Mike

    #46019
    Jonah
    Participant

    Hi Mike,

    This is actually somewhat difficult and can’t supply the time necessary to be able to help you out directly here. You’ll need to work on it on your own or hire someone to help you. I spoke with someone else on the team and here’s generally what they suggested:

    1. I’d tag special events “Special” or whatever
    2. I’d write a new function like move_to_top(array &$list_of_events, $index_to_prioritize) that moves for instance item 4 to the top
    3. I’d iterate through the days events, check if each event is tagged special and if it is call move_to_top

    You’ll want to work this in along with the display_day() function in /wp-content/plugins/the-events-calendar/views/table.php

    Perhaps that will give you some hints as to the direction you’ll need to go. Good luck!

    – Jonah

    #46056
    Mike
    Participant

    Thanks Jonah – if I get anywhere on this I’ll post the result.
    Mike

    #46076
    Jonah
    Participant

    Hi Mike, that sounds great. This would actually be a really helpful modification for others I’m sure. Unfortunately we just don’t have the resources right now to write something up on it. If you come up with anything, it’d be great to see it shared!

    Thanks,
    Jonah

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Ordering Events’ is closed to new replies.