I’ve a customized put up sort with the next ACF fields related:
- doctor (boolean true/false)
- mid_level (boolean true/false)
- provider_last_name (string textual content)
I’m trying to show the posts within the following order:
- Physicians, sorted by Final Identify
- Mid-Ranges, sorted by Final Identify
- Any remaining posts, sorted by Final Identify
I’m utilizing the next WP_Query parameters however it’s not working:
$suppliers['meta_value'] = 'provider_last_name';
$suppliers['meta_query'] = array(
'relation' => 'OR',
array(
'is_physician' => array(
'key' => 'doctor',
'evaluate' => 'EXISTS',
),
'is_not_physician' => array(
'key' => 'doctor',
'evaluate' => 'NOT EXISTS',
),
'is_mid_level' => array(
'key' => 'mid_level',
'evaluate' => 'EXISTS',
),
'is_not_mid_level' => array(
'key' => 'mid_level',
'evaluate' => 'NOT EXISTS',
),
),
);
$suppliers['orderby'] = array(
'is_physician' => 'DESC',
'is_mid_level' => 'DESC',
'meta_value' => 'ASC',
);
Any assist is far appreciated!