Fix order settings.

This commit is contained in:
Hoang Huu
2019-10-31 10:58:21 +07:00
parent 56e6f75efb
commit 5af63726c3
3 changed files with 15 additions and 14 deletions

View File

@@ -245,6 +245,10 @@ class OpalEstate_Search {
$args['meta_key'] = OPALESTATE_PROPERTY_PREFIX . $ksearchs[0];
$args['orderby'] = 'meta_value_num';
$args['order'] = $ksearchs[1];
} elseif ( 'on' == opalestate_options( 'show_featured_first', 'off' ) ) {
$args['meta_key'] = OPALESTATE_PROPERTY_PREFIX . 'featured';
$args['orderby'] = 'meta_value_num';
$args['order'] = 'DESC';
}
$metas = Opalestate_Property_MetaBox::metaboxes_info_fields();