• I don’t know why this is so difficult, but I just want to order my categories in a specific way. Here’s my site: https://www.theappleblog.com

    Right now it seems to just randomly put them in some order. This is how I want them ordered:

    News
    Reviews
    Interviews
    Hardware
    Software
    Walkthroughs
    Commentary
    Deals
    Cult of Mac

    I originally was using the little “hack” of just putting spaces in front of the names of the cateogires but when I upgraded to the final 1.5 it stopped working that way. Any ideas?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Rate them in the order you want them to appear, then sort by ‘rating’.

    Categories don’t have that rating feature. *Link* categories do. I’ve also been wondering about the category ordering myself, but just settled for alphabetic order. (the order you’d like is quite… poetic… somehow, though)

    It’d be nice to have a similar thing for categories than there is now for pages (page order number). Now where’s that NM’s thread where he complains so few people reply (or send him email)…. ?? Then again, I’m sure someone has requested this already.

    I get those confused. ??

    For post categories, there are two useful sort key choices: name or ID. (Sorting by ‘description’ would require a modification to list_cats.)

    The default sort order in the Classic theme is by ID, since it calls wp_list_cats (which itself calls list_cats) with no options set, and so gets all defaults in the code.

    The default order in the Default/Kubrick theme is by name. If you look at its sidebar.php, you will see that it calls list_cats directly, with a great long list of options, most of which are left blank. If you are using Kubrick or a modification thereof, you can change name to ID, and your category list will be displayed in the order in which you created each category.

    You can dig further on your own into the rest of the options for calling list_cats and experiment with setting them, and see what you get.

    Thread Starter jpigford

    (@jpigford)

    I’m familiar with list_cats and it won’t do (atleast not to my knowledge) specified ordering like I’m interested in.

    JPigford, as far as I can tell, you would need to recreate your categories in the order you want to see them, then sort by ID.

    Thread Starter jpigford

    (@jpigford)

    Pericat, yeah, I could go that route. I just hate to have to do all that to do something as simple as setting the order of some categories. I just think there should be an “order category” column so you can specify the order of them exactly.

    Oh, I do, too. ?? That was just the best I could think of, without hacking at the source. Probably be worth writing a plugin.

    plugin halfway there.

    Okay, it’s done. I wouldn’t go so far as to call it tested, mind, but it’s done.

    Explicit Category Sort

    You need to key in your category list, separated by commas only, in the order you want them to appear on your sidebar, as the value for $mylist. Oh, and save the file in your plugins folder, as ‘.php’ instead of ‘.phps’

    pericat, that link is giving a fatal error, undefined function. ??

    I’ll throw my thoughts in…

    On my 1.2 site, it listed my categories, with the ‘sub categories’ indented in the list. Any idea how to get that back?

    Thanks!

    Bugger. OK, fixed now. Changed ‘.php.txt’ to ‘.phps’ which is what it should of been in the first place.

    elmsblog, you need to find and adjust the call to ‘list_cats’ in your theme’s sidebar.php.

    That call accepts 18 options, and hierarchical is the last one. Count them up, and make sure that the last one is 1. If it’s missing, add it. If it’s 0, change to 1.

    https://codex.www.ads-software.com/Template_Tags

    Thread Starter jpigford

    (@jpigford)

    Great pericat. Just what I was looking for ??

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Category Organization…why is this so difficult…’ is closed to new replies.