asc/desc in shortcode view

Home Forums Calendar Products Events Calendar PRO asc/desc in shortcode view

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1628547
    virginiatod
    Participant

    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

    #1629497
    Cliff
    Member

    Hi. 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.

    #1631003
    virginiatod
    Participant

    Sure, you’re right! Here’s the shortcode I’m using:

    [tribe_events view=”list” category=”cat1″ date=”2006-01″]

    #1632710
    Cliff
    Member

    TheĀ 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?

    #1634056
    virginiatod
    Participant

    I want to alter the shortcode list view… I need to see the most recent events first…

    #1634955
    Cliff
    Member

    Well 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.

    #1647359
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘asc/desc in shortcode view’ is closed to new replies.