Can’t get wp_list_categories to list by count… help!
-
Hi all,
As per the title, at https://incredibledad.com, I’m trying to order my categories in my main menu bar by count and it’s only letting me order it by name. I’ve tried changing it to ID but no luck.
Help please and many thanks in advance!
ID
<!-- begin categories --> <!-- Category Nav Starts --> <div id="cat_navi" class="wrap"> <ul id="secnav"> <?php if (get_option('pov_home_link')) : ?> <?php endif; ?> <?php foreach ( (get_categories('exclude='.get_option('pov_cat_ex') ) ) as $category ) { if ( $category->category_parent == '0' ) { ?> <li> <a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->cat_name; ?><br /> <span><?php echo $category->category_description; ?></span></a> <?php if (get_category_children($category->cat_ID) ) { ?> <ul><?php wp_list_categories('orderby=count&title_li&child_of=' . $category->cat_ID); ?></ul> <?php } ?> </li> <?php } } ?> </ul> </div> <!-- Category Nav Ends --> <!-- end categories -->
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Can’t get wp_list_categories to list by count… help!’ is closed to new replies.