我想知道你是不是指this 修改后的Codex示例:
// Fetch:
$terms = get_terms( \'category\', array(
    \'include\' => array( 1, 2, 3 ),
) );
// Output:
if ( ! empty( $terms ) && ! is_wp_error( $terms ) )
{
     $li = \'\';
     foreach ( $terms as $term )
     {
       $li .= sprintf( "<li>%s</li>", $term->name );    
     }
     printf( "<ul>%s</ul>", $li );
 }
 在哪里
$terms 包含术语对象数组、空数组或
WP_Error() 对象
检查上的抄本get_terms() 获取有关输出和输入参数的更多信息。在那里,您可以获得更多的代码示例。