Support » Fixing WordPress » List categories in order of post count

  • Ok so to order categories by name you do this;
    wp_list_cats(‘sort_column=name’)

    In the database table, the fields are called cat_name and cat_id. so wp_list_cats add a prefix of ‘cat_’ to whatever you pass in to this function.

    So how can you order them by the number of posts?

    Passing in ‘category_count’ brings up an unknown error as column ‘cat_category_count’ is missing. Just using ‘count’ obviously doesn’t work either.

    Any ideas?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘List categories in order of post count’ is closed to new replies.