我正在显示教师成员列表,其中包含来自名为“教师成员”的自定义分类法的一些自定义字段信息。每个术语的名称是教师的全名,因此当我使用get_terms()按名称命名时,我会根据名字得到一个按字母顺序排列的列表。我知道我可以过滤get_terms()。但是我无法弄清楚是否有任何方法可以过滤我返回的对象数组,以便它从名称字段中获取姓氏并对其进行排序?与往常一样,任何帮助将不胜感激。
作为参考,这是前两个返回的对象的样子
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 )