Order by metadatum value the results of fetch all metadatum values
This commit is contained in:
parent
3af62e3539
commit
a04a8b93d9
|
@ -3,6 +3,10 @@
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tainacan-modal-title {
|
||||
h1, h2 {
|
||||
font-size: 20px;
|
||||
|
|
|
@ -860,7 +860,7 @@ class Metadata extends Repository {
|
|||
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
|
||||
FROM $wpdb->postmeta $search_query
|
||||
) metas
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d",
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
|
||||
$item_post_type, $post_status, $metadatum_id
|
||||
);
|
||||
} else {
|
||||
|
@ -875,7 +875,7 @@ class Metadata extends Repository {
|
|||
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
|
||||
FROM $wpdb->postmeta $search_query
|
||||
) metas
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d",
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
|
||||
$post_status, $metadatum_id
|
||||
);
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ class Metadata extends Repository {
|
|||
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
|
||||
FROM $wpdb->postmeta $search_query
|
||||
) metas
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d",
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
|
||||
$item_post_type, $post_status, $metadatum_id
|
||||
);
|
||||
} else {
|
||||
|
@ -921,7 +921,7 @@ class Metadata extends Repository {
|
|||
SELECT meta_key as metadatum_id, meta_value as mvalue, post_id
|
||||
FROM $wpdb->postmeta $search_query
|
||||
) metas
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d",
|
||||
ON items.item_id = metas.post_id AND metas.metadatum_id = %d ORDER BY mvalue",
|
||||
$post_status, $metadatum_id
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue