diff --git a/classes/class-get-portfolio.php b/classes/class-get-portfolio.php index 00bb8c59..fe22390c 100644 --- a/classes/class-get-portfolio.php +++ b/classes/class-get-portfolio.php @@ -1449,12 +1449,16 @@ public static function get_query_params( $options, $for_filter = false, $layout_ } } - if ( 'desc' === $custom_order_direction ) { - $images = array_reverse( $images ); - } - break; } + + if ( + 'desc' === $custom_order_direction && + 'rand' === $custom_order && + 'default' === $custom_order + ) { + $images = array_reverse( $images ); + } } // pages count.