Support » Requests and Feedback » Sortable category names/tags

  • Unless I’m missing something, it seems that the category names/tags that appear in the sidebar cannot be sorted. They appear in the same chronological order in which they have been created. That’s annoying.
    What if I feel that my Photos category is more important than my Recipes category and should appear above it in the category listing?
    Imho the order should be user-definable and not just chronological or alphabetical.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Well why not manipulate the category ids and then sort by that.? WP controls are there to be used

    I guess I can figure out how to sort by category ids, but I don’t see how I can manipulate the category ids. It’s not through the interface, is it?

    Although it may not be the correct way, I manipulate the id’s through phpmyadmin. I change the id’s to increments of ten and put them (numerically) in any order I want.

    Or start a program of recycling them so the ids are in the order you want. Create a temp cat called store. Move them in there one by one in the order you want them.

    Take a look at the WordPress docs here:
    In your template, use <?php list_cats() ?> instead of the default <?php wp_list_cats() ?>. Then, you can follow the instructions at the link above to sort by name instead of by id, and you don’t have to worry about hacking around in the database to change id numbers.

    Thanks for the tips!
    benramsey’s hint appears the best solution, there is however one big problem: <?php list_cats() ?> doesn’t work with subcategories (nightly 2004-08-04).
    Is this a bug that needs to be filed?
    I could see some uses for being able to _only_ retrieve the main categories, maybe that should be left in as a feature 🙂

    Hi, I like to agree to on what Muffinboy said. I am new to WordPress but while I configured my layout and so on, I decided, that I need a list_cats implementation where I can select only the main categories and also one, where I can select all child categories for a given main category.
    So, may be someone with a better understanding of php programming likes to implement something like that. Anyway, I will try my best…. 🙂
    Best regards.

    Check out my sorted categories at the bottom of my blog menu.

    Root, I’m not sure what I’m supposed to see when I look at the sorted categories on your site.
    Yes, if you use list_cats you can sort the MAIN categories alphabetically, but list_cats does not output any SUBcategories.
    I noted that at times it could come in handy that you have a way to only show the main categories of your blog and as fitheach says, it would also be nice if you could only list the SUBcategories of one particular MAIN category.
    But! the fact remains that if I use list_cats I expect it to also list SUBcategories. Or am I wrong in thinking that it should?
    Two notes:
    1) it would be even better if there was a user definable order of MAIN and SUB categories
    2) it probably is alreay possible to display just the subcategories of only one main category by excluding all other categories… but that is a lot of work that I’m sure can be handled more elegantly.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Sortable category names/tags’ is closed to new replies.