[wp-hackers] Ordering categories in permalinks

William Davis will.davis at gmail.com
Fri Nov 5 21:31:37 UTC 2010


We're currently using categories in permalinks, but we'd like a way to  
order which categories appear, instead of the default WordPress  
handling which is based on ID number.

So, for example, right now the 'news' category is ID 1, and the  
'politics' category is ID 5. However, if there's a story that's  
categorized both news and politics we'd rather the have the permalink  
contain right /politics/ than /news/. In addition, if politics were to  
be a subcategory we'd rather it was /politics/ instead of /news/ 
politics/.

I've taken a look at http://codex.wordpress.org/Function_Reference/WP_Rewrite 
  and but haven't had a ton of success.

Thanks!

William P. Davis
will.davis at gmail.com
207.660.5342
http://twitter.com/williampd
http://www.wpdavis.com





More information about the wp-hackers mailing list