如果要获取卷类别的所有子代,并且其ID为5,那么可以说:
$categories = get_categories( array(
\'child_of\' => 5
));
foreach($categories as $category) {
echo \'<p>Category: <a href="\' . get_category_link( $category->term_id ) . \'" title="\' . sprintf( __( "View all posts in %s" ), $category->name ) . \'" \' . \'>\' . $category->name.\'</a> </p> \';
echo \'<p> Description:\'. $category->description . \'</p>\';
echo \'<p> Post Count: \'. $category->count . \'</p>\';
}