Skip to content

Commit

Permalink
Fixed sorted by date (#210)
Browse files Browse the repository at this point in the history
* fixed sorted by date

* Update class-get-portfolio.php

---------

Co-authored-by: Nikita <[email protected]>
Fellan-91 and nk-o authored Jul 10, 2024
1 parent b583da7 commit c1fa7e9
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
@@ -1427,6 +1427,10 @@ public static function get_query_params( $options, $for_filter = false, $layout_
case 'image_caption':
case 'image_alt':
case 'image_description':
if ( 'date' === $custom_order ) {
$custom_order = 'published_time';
}

/**
* We've reworked this code to work correctly with empty sortable values.
* Now images with filled values ​​will be sorted first.

0 comments on commit c1fa7e9

Please sign in to comment.