Home › Forums › Calendar Products › Events Calendar PRO › Setting display order of events on monthy calendar
- This topic has 1 reply, 2 voices, and was last updated 7 years, 11 months ago by
scamrcalendar.
-
AuthorPosts
-
April 18, 2018 at 10:55 am #1510441
scamrcalendar
ParticipantWe set up events (hikes) on the calendar, and each hike has an associated color-coded category (Short, Advanced, and so forth)
That all works great.However, the order in which the hikes are displayed on a particular day, aren’t consistent. It almost looks as though their display order is based upon the order in which they were added to the calendar? I am speculating on that one.
We would like to set it up so that the hikes always appear in a specific order:
Advanced Hikes
Upper Intermediate
Intermediate
Casual Intermediate
Short Hikes
Special HikesWe would also like to have the bar at the top of the calendar display the category colors/names in this order (from left to right rather than alphabetically from left to right.
Can you point me to where I might work on accomplishing this? I found the month.php file under /views, but realized that there are functions called to generate the calendar grid itself, and I wasn’t sure where to find those. Any input on the best way to go about this would be appreciated.
Thank you.
April 19, 2018 at 10:37 am #1511459Sky
KeymasterHi Kathleen,
The order of events on any given day is usually determined by the start time of each event. If there are multiple events starting at the same time or “all day events” then it will fallback to something like the publish date.
To change the order the events are output, you would need to modify the events loop in the single-day.php template.
In that template, the events are stored in $day[‘events’]. You would need to use PHP to read this value, reassemble as an array in the order you desire, and resave to $day just before the loop on line 32.
As to the output in the Category Colors plugin, I’m not sure how you would customize that. Since that is not a Modern Tribe plugin, we are not able to provide support for that. The solution would be similar to what I described above, though I’m not certain how to override any templates there. You could reach out to the plugin author through the WordPress.org forums however, and he may be able to help. https://wordpress.org/support/plugin/the-events-calendar-category-colors
Let me know if that helps, or if you have any other questions.
Thanks,
SkyMay 11, 2018 at 9:35 am #1528364Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Setting display order of events on monthy calendar’ is closed to new replies.
