Archive for May, 2005

Category Order

5 May 2005 10:03 am

Powered By Wordpress 1.5.1With the blessing of Pericat, I modified her perisort.php plugin to give it a user-interface within the WordPress menus.

To download, right click and select ‘Save As’: Explicit Category Order

Quick Usage:
# Drop categoryOrder.php in WordPress 1.5+ Plugin directory, and activate it
# Navigate to ‘Manage’ -> ‘Category Order’
# Enter comma and space seperated order of category slugs (available in drop down menu) with Keywords for formatting.
# If your top level categories are empty, you might need to change the function call in your sidebar.php file to: wp_list_cats('hide_empty=0');
# I call my categories with wp_list_cats('sort_column=name'); so that my list defaults to alphabetical when I haven’t set an explicit category order.

Example: by-course, CHILD, appetizers, salad-and-side-dishes, breakfast, BREAK, by-cuisine, CHILD, asian, cuban, indian

This plugin is in use at Cara Dow’s Recipes

Keywords:
* CHILD - flags the next category (and any subsequent categories) as sub-categories.
* TOP - flags the next category (and any subsequent categories) as top-level. Immediately rewinds to original starting level. Remains in effect until the next keyword.
* BACKUP - rewinds one level of nesting. Multiple BACKUPs are okay, though if you rewind your list beyond its original starting level, the extra calls will be ignored.
* BREAK - Similar to TOP as immediately rewinds to original starting level, but also inserts a gap before the next category.

To revert to original list, update your category order with just a space, or deactivate the plugin.

Known issues: This plugin only works if you are using permalinks.