I am having trouble organizing my categories by slug... any ideas?
Here is the code I am using:
I am thinking that this part is where the changes should be, but I am not sure:
<?php /* collect categories */ foreach($posts as $post) : $category = get_the_category('orderby=slug'); $cats[$category->cat_ID] = $category->cat_name; endforeach; /* uncomment next line to have categories sort alphabetically */ // uasort($cats, strcasecmp); $cats = array_flip($cats); ?>
Thank you for your help!