Recurring Events: Can they show up last in the monthly view list

Home Forums Calendar Products Events Calendar PRO Recurring Events: Can they show up last in the monthly view list

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #879815
    gogreaterreading
    Participant

    How can I make my recurring events and all day events show up after all other events on my calendar

    #880380
    Brook
    Participant

    Howdy 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

    #881838
    gogreaterreading
    Participant

    I 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.

    #882667
    Brook
    Participant

    Howdy 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

    1. Nov 13 – Recurring
    2. Nov 14
    3. Dec 1 – Recurring
    4. Dec 2

    Page 2 of Upcoming Events

    1. Dec 3 – Recurring
    2. Dec 9
    3. Dec 13 – Recurring
    4. 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

    1. Nov 14
    2. Dec 2
    3. Dec 9
    4. Dec 25

    Page 2 of Upcoming Events

    1. Nov 13 – Recurring
    2. Dec 1 – Recurring
    3. Dec 3 – Recurring
    4. 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

    1. Nov 14
    2. Dec 2
    3. Nov 13 – Recurring
    4. Dec 1 – Recurring

    Page 2 of Upcoming Events

    1. Dec 9
    2. Dec 25
    3. Dec 3 – Recurring
    4. 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

    #939652
    Brook
    Participant

    Since 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Recurring Events: Can they show up last in the monthly view list’ is closed to new replies.