• 0
Sign in to follow this  
Followers 0

category subnav items

Question

Posted · Report post

Under the theme setting for category subnav items, I have a bunch of category ID's listed and they appear, however they appear sorted alphabetically but I would like them sorted in the order I listed them (by ID number). Thanks!

Share this post


Link to post
Share on other sites

7 answers to this question

  • 0

Posted · Report post

Hi Soljon - Are you talking about the way they're listed in the admin area? Or in the nav?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I'll need some more details. Theme Settings or WordPress Settings? Are you using custom menus in Appearance > Menus? Can I get a link? Thanks, Bryan

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

In _subhead.php inside of the library directory make sure line 13 reads like this with the added orderby on the end: ` <?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li=&orderby=id'); ?> `

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

My existing line 13 is simply Contents of file: <?php if($post->post_parent || wp_list_pages("title_li=&child_of=".$post->ID."&echo=0")) $subnav = true;?> <?php if($subnav && !pagelines('hide_sub_header')):?> <div id="subhead" class="content fix"> <?php require(THEME_LIB.'/_subnav.php');?> </div> <?php elseif((is_home() || is_category()) && pagelines('subnav_categories')):?> <div id="subhead" class="content fix"> <div id="subnav" class="fix">

  • <?php wp_list_categories('include='.pagelines('subnav_categories').'&title_li='); ?>
</div> </div> <?php endif;?>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Okay perhaps it's a different line, but you can still see the line of code I'm referring to...which starts with ` <?php wp_list_categories('include='.pagelines('subnav_categories'). '&title_li=&orderby=id'); ?> `

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I cannot believe I did not see that. I just changed it and it works. I was up pretty late and my mind was fried when I first looked at it. Thanks so much for the help!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0