Categories Not In Order
-
Hi Guys i’m having a bit of a problem here as i’m not well versed in PHP and CSS. The categories are not the order i want them. They are sorted out in alphabetical order which i do not want.
The categories.php codes are as below:
<!-- 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; ?></a> <?php if (get_category_children($category->cat_ID) ) { ?> <ul><?php wp_list_categories('title_li&child_of=' . $category->cat_ID ); ?></ul> <?php } ?> </li> <?php } } ?> </ul> </div> <!-- Category Nav Ends --> <!-- end categories --> <div style="clear: both;"></div>
If i’m not wrong, the code i should be looking for would be:
<?php wp_list_categories('title_li&child_of=' . $category->cat_ID ); ?>
I’ve tried changing that to:
<?php wp_list_categories('orderby=name&include=3,5,9,16'); ?>
The numbers represent my cat ID but when i save changes, the categories are still in the default sorted by alphabetical order. I appreciate if anyone could help me out ??
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Categories Not In Order’ is closed to new replies.