Home › Forums › Calendar Products › Events Calendar PRO › day and date delineator header in list view
- This topic has 6 replies, 2 voices, and was last updated 6 years, 10 months ago by Robert.
-
AuthorPosts
-
June 7, 2017 at 12:32 pm #1294810RobertParticipant
I have many events on each day. In the list view, there is no clear break separating each day in the long list of events. I’d like to force my list view to have a new day and date header at the start of each day to clearly delineate the start of a new day in the long list of events. How is this possible?
June 9, 2017 at 4:15 pm #1295999VictorKeymasterHi Robert!
Thanks for reaching out to us! 🙂
Sure! That is posible by making a template customization. We have a great article on customizing our templates here > https://theeventscalendar.com/knowledgebase/themers-guide/
Specifically, you should take a look at the ‘tribe_events_list_the_date_headers()’ funtion located at /wp-content/plugins/the-events-calendar/src/views/list/loop.php. This function outputs month and years separators in the list. If you make use of the ‘tribe_events_list_the_date_headers’ filter you can customize the output to also add day separators.
I hope that helps and let me know if you have other questions.
Best,
VictorJune 12, 2017 at 2:41 pm #1296857RobertParticipantI wish this made some sense to me. Can you tell me what to copy and paste in the loop file to give me a day header separator in the list view?
June 12, 2017 at 7:56 pm #1296964VictorKeymasterHi Robert!
I’m sorry I was not clear enough.
First off, I do want to note that we are fairly limited in how much we can support custom development questions like this.
That said, I’d be happy to at least point you in the right direction as best I can. We also have a list of freelancers who we would happily recommend for this level of help.
I managed to come up with a code snippet that will show the date header when the day changes. You should add the following code to your theme’s functions.php file to make it work:
https://gist.github.com/vicskf/73fb04230fb4948f53369471787f52ea
Make sure you don’t add the ‘<?php’ opening tag twice in your file.
I hope that helps! 🙂
Cheers!
VictorJune 15, 2017 at 4:12 pm #1298851RobertParticipantThank you. It works. It would be a nice feature to have a simple checkbox in your plug to choose this display option. It’s important to display the events in a manner that makes sense. That should not be difficult. Thanks again.
June 16, 2017 at 6:11 am #1299053VictorKeymasterHi Robert!
Good to know it worked out for you. Thanks for letting me know.
I can see the use in having that option in the settings. I encourage you to post that idea in our User Voice here > https://tribe.uservoice.com/, so other users can vote for it and make its way into a future feature release of our plugins.
I’ll go ahead and close this now, but feel free to open a new one if anything comes up and we’d be happy to help. 🙂
Best,
Victor -
AuthorPosts
- The topic ‘day and date delineator header in list view’ is closed to new replies.