Home › Forums › Calendar Products › Events Calendar PRO › List View Order
- This topic has 3 replies, 2 voices, and was last updated 10 years ago by
Brook.
-
AuthorPosts
-
May 15, 2016 at 4:39 pm #1114757
Joe
ParticipantGood 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
May 16, 2016 at 5:17 pm #1115180Brook
ParticipantHowdy 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
May 19, 2016 at 6:48 pm #1116815Joe
ParticipantThis reply is private.
May 20, 2016 at 8:12 am #1117026Brook
ParticipantIt was my pleasure Joe. Thanks for getting back and confirming that worked.
Cheers!
– Brook
-
AuthorPosts
- The topic ‘List View Order’ is closed to new replies.
