Order WordPress Query by Custom Field While Still Using Tax_query Argument
You can use a meta_query in addition to your tax_query : https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters I have in which if statement you want to use it so I put it in the of the code. $names = array( ‘fields’ => ‘names’ ); $prac_names = get_terms(‘attorney-practice’, $names); $prac_matches = array_shift(preg_grep (‘(‘. $search .’)’, $prac_names)); $off_names = get_terms(‘office-location’, $names); $off_matches … Read more