Home › Forums › Calendar Products › Events Calendar PRO › Event ordering on home page
- This topic has 4 replies, 3 voices, and was last updated 10 years, 7 months ago by
Support Droid.
-
AuthorPosts
-
September 23, 2015 at 7:19 am #1007839
Rene Schipper
ParticipantHi,
On the homepage of the site we want to display the last entered event in a category. How can we arrange that because at this moment not the event with the last published date is visible but a event that has the highest date (from now).
For example:
Someone has published a event called ‘betoverende winterwandeltocht in Klarenbeek’ for 30 januari 2016. After this event was published another event in this category with an earlier date was published but not visible on the homepage.Cheers,
Rene Schipper
September 23, 2015 at 1:43 pm #1008033George
ParticipantHey @Rene,
Most of what you’re trying to do would require writing custom code – that is unfortunately not something we offer support for, so we can’t help out a whole lot here, but I’m happy to share some resources to get you started in the right direction.
The first thing worth sharing is our Themer’s Guide, which will describe how to customize The Events Calendar views in a safe way. Check that out here if you haven’t already → https://theeventscalendar.com/knowledgebase/themers-guide/
Next, and most important specifically to your request of displaying events by a certain category and order, is this article on using tribe_get_events() → https://theeventscalendar.com/knowledgebase/using-tribe_get_events/
That tribe_get_events() function is how you’ll be able to get events by category and then sort them by publish date – check out that article and play around with things a bit, these resources combined should help quite a bit!
Cheers,
GeorgeSeptember 24, 2015 at 12:08 am #1008176Rene Schipper
ParticipantHi George,
Thanks for the answer and I will look at the named options.
But… isn’t that a strange setting? I sounds logical to me to view the latest published event and not to publish an event with the latest date (in the future).
Rene
September 25, 2015 at 7:14 am #1008686George
ParticipantHey Rene,
Thanks for your feedback here. I would tend to agree that it would be odd to make the order by start date an odd setting, but we’re not really making it a “setting” here – in your case, you want to write a custom query for events on your homepage:
On the homepage of the site we want to display the last entered event in a category.
For where we have our default event queries, showing events by start date makes some more sense because these are the default “out-of-the-box” calendar views, and just like any physical calendar out there or calendar app like iCal or Google Calendar, we show the events in the calendar by start date.
I’ll close up this ticket for now – I wish you the best of luck with your customizations!
Cheers,
GeorgeOctober 10, 2015 at 7:05 am #1013423Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Event ordering on home page’ is closed to new replies.
