Home › Support Forums › Theme Support › Enlightenment › Feature Idea/Request: Random Content in Image Slider (aka Custom Query Setting) › Reply To: Feature Idea/Request: Random Content in Image Slider (aka Custom Query Setting)
Daniel Tara
Keymaster
Well, you should have said that to begin with. You have put quite a bit of effort into that website to keep it private. The site description is causing an overflow in the navbar that forces the nagigation to stack under a “More” link.
Here’s how you can make posts display in a random order:
First create a child theme. Then paste the following function in the child theme’s function.php file:
add_filter( 'enlightenment_custom_loop_args', 'enlightenment_custom_query_widget_random_order' ); function enlightenment_custom_query_widget_random_order( $args ) { // Here you can replace slider with list, gallery or carousel if( 'custom_query_widget_slider' == $args['query_name'] ) { $args['query_args']['orderby'] = 'rand'; } return $args; }