WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi all I am newbie to wordpress I am using the wp_list_categories in the sidebar to display the categories . How can i display thus categories sort by id any one much appreciated...

<?php wp_list_categories('exclude=73');?>
share|improve this question
up vote 2 down vote accepted

wp_list_categories takes an orderby parameter which accepts :

  • ID - Default
  • name
  • slug
  • count
  • term_group

So the default behavior of wp-list-categories is to order by ID but you can specify that like so:

<?php wp_list_categories(array('exclude'=> 73,'orderby' => 'ID'));?>
share|improve this answer
I get this error Parse error: syntax error, unexpected '-', expecting '(' in /home/content/67/7399467/html/banas/wp-content/themes/Banas/sidebar.php on line 6 – Vignesh Pichamani Dec 24 '12 at 15:37
<?php wp_list_categories(array('exclude'=> 73,'orderby' => 'ID'));?> and it's working thanks Much appreciated – Vignesh Pichamani Dec 24 '12 at 15:48
opps, fixed it. – Bainternet Dec 24 '12 at 15:49
Many thanks ,Without your help i did'nt solve that problem ... – Vignesh Pichamani Dec 24 '12 at 15:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.