Ordering categories (2 posts)

  1. Davepar
    Posted 11 years ago #

    I found a fairly painless way to order categories that doesn't require any code mods. First create a column called "cat_order" in the wp_categories table. I made mine varchar(64). Then put numbers or whatever you want in the field for each category using phpMyAdmin or other DB software. Then use "sort_column=order" in the call to wp_list_cats (or put "order" in the sort_column parameter of list_cats). There's no way to edit the order through WordPress unless you modify the admin scripts.

    Getting the hierarchical display of categories working was a whole nother hassle. list_cats has some serious bugs.

  2. billh
    Posted 11 years ago #

    I use the wp_get_links('categorynumber') function to order my links by category. Of course, the order is strictly alphabetical by website name, but I can choose which category that gets displayed by changing the 'categorynumber' parameter in the function call.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.