WordPress.org

Ready to get started?Download WordPress

Forums

Alphabetical Sorting of Categories (9 posts)

  1. pezastic
    Member
    Posted 10 years ago #

    I agree, it makes sense to have the default list in alphabetical order.

  2. Christine
    Member
    Posted 10 years ago #

    Actually, I found code in the Wiki that I used on my site; just a basic parameter for the category tag, and it now lists my categories in alphabetical order.
    <?php wp_list_cats("sort_column=name"); ?>
    Hope that helps!
    Christine

  3. Christine
    Member
    Posted 10 years ago #

    By the way, I found all the available parameters available here:
    http://wiki.wordpress.org/wp_list_cats

  4. designbymichael
    Member
    Posted 10 years ago #

    It's some of those "cryptic" details that mildly annoy me about WordPress. Unless you're digging for it, you wouldn't know that it exists... and you have to dig.
    From a general end-user's perspective, there should be a few interface-related changes in WordPress' back-end management. Sorting should be toggled with the click of your mouse, not by digging in templates or code and changing values that are unknown to the average "afraid-to-dig-or-mess-with-code" users. I'm not refuting how cool WP is or how powerful it can be�but there are a few things about it that really could be made a bit more "intuitive" or self-explanatory. Hunting for or modifying a PHP function isn't as intuitive if one isn't familiar with PHP, let alone the database structure.

  5. Root
    Member
    Posted 10 years ago #

    I hope you will forgive me for saying this but somehow I find the phrase *in WP there should* etc incongruous. Why should there?

  6. designbymichael
    Member
    Posted 10 years ago #

    Incongruous?
    Ok, let me break it down for you.
    I've been working with various web development companies and clients on interface-related issues, and I've found that the more efficient you make your layout and how things operate (simple single-click/toggle verses keying in your sort order) the easier it is for your end-users to figure it out. Afterall, isn't that one of the goals of WordPress, to provide a great, easy-to-use, and powerful blogging tool into the hands of a variety of users throughout the globe?
    I simply say "should" because it's an expressed opinion about what I think could be done to improve WordPress and make it an even more favorable application. Just because I say WordPress "should" do something, doesn't mean they have to, will, or even think about doing it. It's like me saying we "should" get the troops out of Iraq before the end of theyear... we should, really... but my saying so isn't necessarily going to change the minds of the current administration.
    Oh, and I find nothing incongruous about my remarks. If you're going to find my phrase(s) incongruous, at least share your thoughts as to why you think so... otherwise you leave the rest of us wondering, "huh?"

  7. hork
    Member
    Posted 10 years ago #

    If enough people ask for a feature or a particular behavior of the software, it "should" be considered for addition to the software as an option (in the case where the original behavior is still desired) or a replacement to the original functionality (where the original behavior is not deemed useful). I've seen the request for the ability to define the order of the categories several times already in this forum since people aren't satisfied with the default search order.
    I had to hack my index.php file to change the sort order, but I would have preferred to choose the sort order in the categories administration page.
    The full-featured answer would be to allow the admin to choose to sort by id, alphabetically by name, or by admin-defined order. True implementation of the admin-defined order would include a field for each record in the category table to hold the order index plus an interface in admin to allow admins to easily move categories up or down in a list to define the order.
    Right now, it seems people are hacking the admin-defined order by editing their index.php to use alphabetical by name sorting, and then adding spaces to the beginning of their category names to make them sort the way they want. The spaces don't show up in the list of categories, but the more spaces you have in front of the category, the higher it will appear in the sorted list.

  8. Nomad
    Member
    Posted 9 years ago #

    but the more spaces you have in front of the category, the higher it will appear in the sorted list.

    That doesn't seem to be working for me. I'm adding spaces using the admin Categories screen and edit function, putting spaces in front of the titles. Is that how it's supposed to be one?

  9. Anonymous
    Unregistered
    Posted 9 years ago #

    Hi --
    A big tip o' the cap to Michael for digging through the code and putting up this suggestion. I just made the alteration and it works like a charm. As time goes on, my blog (SexBizBlawg) will have a large number of categories, and this makes it look much better.
    As a member of the code-challenged, I appreciate the help of this community. Thanks again.
    Fred

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.