|
|
@@ -108,7 +108,7 @@ class Make_Sort_By extends WP_REST_Controller {
|
|
108
|
108
|
JOIN wp_postmeta AS ends
|
|
109
|
109
|
ON (ends.post_id = wp_posts.ID AND ends.meta_key = %s AND ends.meta_value >= %s)
|
|
110
|
110
|
WHERE post_type = %s AND post_status = 'publish'
|
|
111
|
|
- ORDER BY starts.meta_value ASC",
|
|
|
111
|
+ ORDER BY ends.meta_value ASC",
|
|
112
|
112
|
$start, $time, $time, $end, $time, $this->post_type
|
|
113
|
113
|
));
|
|
114
|
114
|
wp_reset_postdata();
|
|
|
@@ -127,7 +127,7 @@ class Make_Sort_By extends WP_REST_Controller {
|
|
127
|
127
|
JOIN wp_postmeta AS starts
|
|
128
|
128
|
ON (starts.post_id = wp_posts.ID AND starts.meta_key = %s AND starts.meta_value >= %s)
|
|
129
|
129
|
WHERE post_type = %s AND post_status = 'publish'
|
|
130
|
|
- ORDER BY starts.meta_value ASC",
|
|
|
130
|
+ ORDER BY ends.meta_value ASC",
|
|
131
|
131
|
$start, $time, $this->post_type
|
|
132
|
132
|
));
|
|
133
|
133
|
wp_reset_postdata();
|