List View Order

Home Forums Calendar Products Events Calendar PRO List View Order

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1114757
    Joe
    Participant

    Good day,

    I’m quite familiar with customizing your handy plugin. However, I’ve run into something that I thought you might have insight on.

    Under the “tribe-bar-views-list”, where the various calendar view types can be selected, is there a way to control their order? By default, it appears to display the current view type at the top. I’d like to revise this as well.

    So, basically:

    1. I’m hoping to control the exact order of the view names under “tribe-bar-views-list”.

    2. I’d like to prevent this list from ever changing, regardless of calendar view type.

    I realize that you do not offer in depth customization support. But I thought it would be worth reaching out to see if you had any leads here. Thanks a bunch for your time.

    – Joe

    #1115180
    Brook
    Participant

    Howdy Joe,

    I would love to help you with this. When we say don’t offer “in-depth customization support” it’s just a short way of saying we can’t write the code for you. We are however happy to help point you in the right direction.

    Have you seen the tutorial Understanding and customizing the Tribe Events Bar ? It is going to be very helpful here. In particular the section on adding views. As you can see there is a WP filter called ‘tribe-events-bar-views’ . This filter contains an array, and each item in the array is a list item on the views drop down. If you want to add/remove or just reorder the list, the easiest way would to overwrite the array. Instead of adding you view using $views[] = …; You could create a new array and return that instead. Order it however you want, include whatever items you want. Just attach it with an high priority.

    Hopefully that all made sense. It will require some PHP knowhow to do this, but armed with that you should be golden.

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1116815
    Joe
    Participant

    This reply is private.

    #1117026
    Brook
    Participant

    It was my pleasure Joe. Thanks for getting back and confirming that worked.

    Cheers!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘List View Order’ is closed to new replies.