Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Advanced Search Results Ordered by Price Reply To: Advanced Search Results Ordered by Price

#99741

elliottagain
Participant

Hi Anna,

Trying to change advanced_search_results.php to show results starting with cheapest price first; ‘ASC’

We have changed the code as below but not working, any ideas please?

//////////////////////////////////////////////////////////////////////////////////////
///// compose query
//////////////////////////////////////////////////////////////////////////////////////
$args = array(
‘post_type’ => ‘estate_property’,
‘post_status’ => ‘publish’,
‘paged’ => $paged,
‘posts_per_page’ => 30,
‘meta_key’ => ‘property_price’,
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘ASC’,
‘meta_query’ => $meta_query,
‘tax_query’ => array(
‘relation’ => ‘AND’,
$categ_array,
$action_array,
$city_array,
$area_array
)
);

Many thanks
Elliott