The order of my listing should be something like the below:
The order of business listing should be, Featured -> Sales -> Member Discount -> rest of the Businesses
Clarification: When a user selects any specific category the listing should display based on featured listing(If any) first, then the Sales/Discounts(If any), then rest of the businesses.
The code currently I am trying is:
function pre_get_places($query) {
$query->set('meta_key', 'et_featured');
$query->set('meta_value_num', '1');
$query->set('orderby', 'meta_value_num');
}
This is my intial step to display the featured listing first. But it does not do the trick.
Any help will be greatly appreciated