List categories with description
-
Hi, little problem… i need see a list of categories with title and description but dont see count article for categories. I use the widget in siderbar and i create this function:
function viewCategories() { global $post; $args=array( 'orderby' => 'name', '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>'; } }
the problem is that the output does not change anything.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘List categories with description’ is closed to new replies.