Timeline for User Defined order on get_categories?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 26, 2021 at 5:55 | comment | added | Trevor | Anyone still looking at this question, while the accepted answer definitely works, I think this more recent answer is cleaner and works if you ever need a totally different order: wordpress.stackexchange.com/a/222289/17461 | |
Sep 5, 2014 at 21:26 | vote | accept | Garrett | ||
Sep 5, 2014 at 6:35 | answer | added | aifrim | timeline score: -2 | |
Sep 5, 2014 at 6:21 | answer | added | Pieter Goosen | timeline score: 2 | |
Sep 5, 2014 at 0:09 | comment | added | Garrett |
Just noting, the include call is already in the right order. If I could instruct get_categories to not sort at all, it would be great. 'include' => '12,13,14,15,16,1',
|
|
Sep 4, 2014 at 21:36 | comment | added | Garrett | 6 objects are produced, which in the var dump show as: [0] => values [1] => values [2] => values There are 6 (0-5) and I need the order (1,2,3,4,5,0). Note that the first one needs to be the last one. So orderby won't work, as I only have ASC and DESC according to name, IDetc. But I need to control each object's position in the list according to the client's preference. | |
Sep 4, 2014 at 6:24 | comment | added | Pieter Goosen |
What specific order are you looking for? Did you had a look at the orderby parameters in get_categories . Do you need to sort them differently than the excepted values in get_categories
|
|
Sep 3, 2014 at 23:30 | history | asked | Garrett | CC BY-SA 3.0 |