Skip to content

Commit

Permalink
fixed sorted by date
Browse files Browse the repository at this point in the history
  • Loading branch information
Fellan-91 committed Jul 5, 2024
1 parent 8d75011 commit 91a25bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/class-get-portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,10 @@ public static function get_query_params( $options, $for_filter = false, $layout_
* Now images with filled values ​​will be sorted first.
* And empty images will be inserted later at the very end of the array.
*/
if ( 'date' === $custom_order ) {
$custom_order = 'published_time';
}

$images = self::sort_array_by_field( $images, $custom_order, $custom_order_direction );
break;
case 'rand':
Expand Down

0 comments on commit 91a25bf

Please sign in to comment.