「教職員」と呼ばれるカスタム分類法からのカスタム フィールド情報を含む教職員のリストを表示しています。各学期の名前は教員の氏名なので、get_terms() を使用して名前で並べ替えると、名前に基づいてアルファベット順のリストが取得されます。get_terms() をフィルタリングできることはわかっています。しかし、返されたオブジェクトの配列をフィルタリングして、名前フィールドから姓を取得し、そのように並べ替える方法があるかどうかわかりませんか? いつものように、どんな助けでも大歓迎です。
参考までに、返された最初の 2 つのオブジェクトは次のようになります。
Array ( [0] => stdClass Object ( [term_id] => 44 [name] => Abigail McKenzie [slug] => abigail-mckenzie [term_group] => 0 [term_taxonomy_id] => 47 [taxonomy] => faculty-member [description] => Abigail McKenzie has a BFA in painting from the Cleveland Institute of Art, and an MA and MFA in printmaking from the University of Iowa. She is currently the chairman of the Art Department at Flint Hill School in Oakton, Virginia. [parent] => 0 [count] => 1 ) [1] => stdClass Object ( [term_id] => 7 [name] => Amanda Dalla Villa Adams [slug] => amanda-dalla-villa-adams [term_group] => 0 [term_taxonomy_id] => 10 [taxonomy] => faculty-member [description] => Amanda Dalla Villa Adams is a current doctoral student in art history at Virginia Commonwealth University, received her BFA in sculpture from VCU, and her MA in art history from the University of Cincinnati. [parent] => 0 [count] => 3 )