Setting up a listing of Categories w/ their descriptions. All of the categories are within a custom post type named "works"
Have something that is ALMOST giving me what I want, and so far have not been able to edit in correctly to get what I need.
THIS IS WHAT I WANT:
- A list of each category within the custom post type "works" along with it's description.
- ONLY the top level Categories, NO child categories.
- The listed categories ordered by which has the greatest number of posts within it FIRST.
THIS IS WHAT I HAVE:
- A list in reverse ascending alphabetical order of ALL of the categories within the custom post type parent, and children with descriptions.
the code i have now...
<?php $args=array('orderby' => 'name','order' => 'ASC');$categories=get_categories('taxonomy=works');foreach($categories as $category) {echo '<h1><a href="' . get_category_link( $category) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></h1>';echo '<p>'. $category->description . '</p>'; }?>