Home › Forums › Calendar Products › Events Calendar PRO › asc/desc in shortcode view
- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by Cliff.
-
AuthorPosts
-
September 23, 2018 at 6:48 am #1628547virginiatodParticipant
Hi, I have a very simple question:
is there a way to change the asc/desc order of the events in the shortcode view?Thank you
September 24, 2018 at 1:48 pm #1629497CliffMemberHi. We have multiple shortcodes (https://theeventscalendar.com/knowledgebase-tag/shortcodes/). Please specify which shortcode you’re referring to by pasting the entire shortcode here, with all the arguments you’re using.
September 26, 2018 at 7:12 am #1631003virginiatodParticipantSure, you’re right! Here’s the shortcode I’m using:
[tribe_events view=”list” category=”cat1″ date=”2006-01″]
September 27, 2018 at 3:34 pm #1632710CliffMemberTheĀ tribe_events shortcode is a way to embed our main event views anywhere on your site. Therefore, its output matches that of yoursite/events/list
Do you want to alter the ordering of both the shortcode’s and main event view’s ordering?
September 30, 2018 at 10:47 am #1634056virginiatodParticipantI want to alter the shortcode list view… I need to see the most recent events first…
October 1, 2018 at 4:05 pm #1634955CliffMemberWell I tried for you, but this isn’t possible… here’s some roundabout code that works for the initial List View rendering, but not the previous/next events navigation:
https://gist.github.com/cliffordp/448a112d0ce05fb6e7d57a63a201e4e4
(Please reference https://theeventscalendar.com/knowledgebase/implementing-custom-code-snippets/ for how to implement custom code snippets.)
FYI: this code sets the order to DESC, but it sounds like you want it ASC, which it already is by default. Still, the code I shared is just a proof of concept.
You can use it as a starting point or just live with the limitation that you can’t specifically target the shortcode’s rendering and use some different code to override the main List View render (i.e. whether from shortcode or the yoursite/events/list URL)
I’ve ticketed this as a desired future enhancement, so this thread will receive a reply if/when that functionality gets added, but it’s unlikely to be before the end of this year, just as a realistic guess.
I hope this information helps a bit.
October 23, 2018 at 9:35 am #1647359Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘asc/desc in shortcode view’ is closed to new replies.