Home › Forums › Calendar Products › Events Calendar PRO › Recurring Events: Can they show up last in the monthly view list
- This topic has 4 replies, 2 voices, and was last updated 11 years, 2 months ago by
Brook.
-
AuthorPosts
-
November 12, 2014 at 8:26 am #879815
gogreaterreading
ParticipantHow can I make my recurring events and all day events show up after all other events on my calendar
November 12, 2014 at 12:49 pm #880380Brook
ParticipantHowdy gogreaterreading,
Interesting notion. Which view are you trying to do that on? Month, List, Map? Say you have 10 pages of upcoming events, would you want the recurring event to show up on page 9 or 10 even if it starts tomorrow? Or would you want the recurring events for a given page to appear at the bottom of each page, maybe with a heading above?
As much detail as you can provide would be awesome. From the sound of it this will be a very involved customization. Fair warning, you will require a lot of PHP and possibly SQL knowhow to wirte all of the custom code you would need.
Please let me know! Then I can give you a more complete answer.
– Brook
November 13, 2014 at 4:43 am #881838gogreaterreading
ParticipantI would want the recurring events to appear AFTER all individual events in any view on any given day. Most importantly in the list view and the monthly view.
November 13, 2014 at 10:41 am #882667Brook
ParticipantHowdy gogreaterreading,
Thanks for clarifying. I still need a bit more info to go on. This is probably best explained with some examples to eliminate confusion. Let us say you have the following upcoming events in list view:
Page 1 of Upcoming Events
- Nov 13 – Recurring
- Nov 14
- Dec 1 – Recurring
- Dec 2
Page 2 of Upcoming Events
- Dec 3 – Recurring
- Dec 9
- Dec 13 – Recurring
- Dec 25
If you want to redo this so that the recurring events appear last for the whole loop that could happen via WP Query sort Order. This would be the result:
Page 1 of Upcoming Events
- Nov 14
- Dec 2
- Dec 9
- Dec 25
Page 2 of Upcoming Events
- Nov 13 – Recurring
- Dec 1 – Recurring
- Dec 3 – Recurring
- Dec 13 – Recurring
If you instead want to sort it so recurring events appear after per page, you’d probably need to write a sorting algorithm. This can certainly be done, you’d need to tap into tribe_get_events() via filter and sort the returned results based TribeEvents::current_view.
Page 1 of Upcoming Events
- Nov 14
- Dec 2
- Nov 13 – Recurring
- Dec 1 – Recurring
Page 2 of Upcoming Events
- Dec 9
- Dec 25
- Dec 3 – Recurring
- Dec 13 – Recurring
But that is just one view. You will need to ponder every view before jumping in though. Week View for instance, the vertical position of an item indicates it’s time. Moving recurring events anywhere would mislead the user on what time they happen. In Day View you would face fewer complications and that could happen regardless via adjust the WP Query sort Order.
Hopefully that helps! If you have any questions about our API, or if you have a programmer writing the above queries for you, please point them our way. Does that answer your question?
– Brook
February 2, 2015 at 11:46 pm #939652Brook
ParticipantSince we have not heard back in a while I am going to archive this topic. If you need anything else though please feel free to open a new topic. We will be glad to help. Cheers!
– Brook
-
AuthorPosts
- The topic ‘Recurring Events: Can they show up last in the monthly view list’ is closed to new replies.
