function get_people_cats($taxonomy) {
$output = '';
$terms = get_terms($taxonomy);
$count = count($terms);
if ( $count > 0 ):
foreach ( $terms as $term ):
$output .= "'". $term->name ."'". '=>';
$output .= "'". $term->term_id."',";
endforeach;
endif;
return $output;
}
この関数は、カスタム分類法のリストと、関数がテンプレートで呼び出された場合に見つかった単語を返します。しかし、関数の値を の変数に割り当てたいのですが、functions.php
何も返されません。