wordpress获取全部分类

<?php
$args=array(
'orderby' => 'name',
'hide_empty' => false, //显示所有分类
'order' => 'ASC'
);
$categories=get_categories($args);
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>';
}
?>