• Resolved dreyes13

    (@dreyes13)


    Hi, What is the best way to organize the list of past events in descending order without altering the upcoming events. I would like to show the latest past event at the top and the ones from 2016 way at the bottom. Ex. Past Events: Dec 2020, Dec 2019, Dec 2018, etc.
    Is there an update with shortcode? Do I have to go to the php files?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • AJ Don

    (@cultural-keys)

    Ha, I was just coming to ask the same question! Hopefully Devs will be along soon with an answer.

    We have about 100 past events now, and list them separately on their own page using [event_listing type=”past”] so a way to show most recent first would really be helpful! ??

    • This reply was modified 3 years, 6 months ago by AJ Don.
    • This reply was modified 3 years, 6 months ago by AJ Don.

    Hello @dreyes13 and @cultural-keys,

    We are sorry for the inconvenience.

    We apologies to inform you that you can’t do this with the help of any default shortcode. You would have to perform alterations in PHP files. We would suggest you use pre-defined filters for the alterations.

    For now, you can use this code to list posts in descending orders.

    add_filter('sep_output_events_args','sep_desc_order_view', 11, 2);
    
    function sep_desc_order_view($args, $atts) {
    	$args['order'] = 'DESC';
    	return $args;
    }

    Feel free to reach out if the issue still persists.

    Regards,

    Thread Starter dreyes13

    (@dreyes13)

    That is excellent, thank you for your response and the code. To which of the php files should I add the code?

    Hi @dreyes13,

    We can’t confirm any file. You have to debug this on your own or take help from an expert WP Plugin Developer.

    Feel free to reach out if the issue still persists.

    Regards,

    AJ Don

    (@cultural-keys)

    Oh, that’s disappointing that it’s not a simple file fix…. ??

    Oh well, Fiverr here I come I guess!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode for Sorting Past Events in descending order’ is closed to new replies.