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'
) ); ?>

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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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