Hi there,
I am trying to create a Royal Slider that shows events by event date (like list view) rather than the default publish date. I have tried to search the EC Pro documentation, but unfortunately the search isn’t working. Essentially, I’m trying to establish what an ‘event date’ would be called if I replace the default word ‘title’. For clarity, I’ve provided the code I’m editing below. Basically, I want to sort by (event) date, like the usual EC displays, but I can’t find what the ‘magic word’ is! 🙂
add_filter(‘new_royalslider_posts_slider_query_args’, ‘newrs_custom_query’, 10, 2);
function newrs_custom_query($args, $index) {
// $args is WP_Query arguments object.
// feel free to change them here
$args[‘orderby’] = ‘title’;
// $index is an ID of slider that you’re modifying
return $args;
}