Home › Forums › Calendar Products › Events Calendar PRO › Ordering Events
- This topic has 5 replies, 2 voices, and was last updated 13 years ago by
Jonah.
-
AuthorPosts
-
April 15, 2013 at 4:44 am #45824
Mike
ParticipantOn 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.April 15, 2013 at 12:53 pm #45860Jonah
ParticipantHi 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?
April 16, 2013 at 12:49 am #45929Mike
ParticipantHi 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
MikeApril 16, 2013 at 2:24 pm #46019Jonah
ParticipantHi 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_topYou’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
April 17, 2013 at 12:37 am #46056Mike
ParticipantThanks Jonah – if I get anywhere on this I’ll post the result.
MikeApril 17, 2013 at 8:14 am #46076Jonah
ParticipantHi 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 -
AuthorPosts
- The topic ‘Ordering Events’ is closed to new replies.
