WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I have a blog in which several post's categories have to be outputted first before other categories. Those categories have lower ID compared to other categories. I am using get_the_category_list but it is not working as I expected. Makes me confused because I remember a theme doing this very well. Can someone point me in the right direction? Thanks!

<?php get_the_category_list( array(
  'orderby'      => 'ID',
  'order'     => 'ASC'
) ); ?>
share|improve this question
up vote 1 down vote accepted

You're using wrong arguments for get_the_category_list function. The function you should use for this is wp_get_object_terms http://codex.wordpress.org/Function_Reference/wp_get_object_terms

share|improve this answer

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.