I have added this snippet to functions.php to be able to order Slider Revolution slides:
// orderby slideshows
function modify_slider_order($query, $slider_id) {
// only alter the order for slider with "x" ID
// https://tinyurl.com/zb6hzpc
if($slider_id == 17 ) {
// Custom Meta key/name
$query['meta_key'] = 'numeric_order';
// Order by Custom Meta values
$query['orderby'] = 'numeric_order';
// Calculate order based on:
// 'NUMERIC', 'CHAR', 'DATE', 'DATETIME', 'TIME'
$query['meta_type'] = 'NUMERIC';
}
return $query;
}
add_filter(‘revslider_get_posts’, ‘modify_slider_order’, 10, 2);
I would like to reference either all slideshows, or another (id=16). I have tried commenting out the "if($slider_id…" part, and also tried adding the other slide id separated by a comma next to the 17, but WP is kicking up errors. Thank you.