0

I am simply trying to reorder my dropdown options in my header menu. It pulls from categories and is currently listed them, with the exception of the first, in alphabetical order. I want to list in order of slug. I have tried to change the 'orderby' but seemingly unsuccessfully.

Attached are screen shots of a) the dropdown as it currently displays and enter image description here

b) the code for this section of the header. enter image description here

All feedback is welcome as I make an update to that code.

Cheers!

2 Answers 2

1

In $args you are using

'child_of'=>5,

why are you using this and if you are using this parameter you should set

hide_empty => 0
1

Change 'orderby' => 'name' to 'orderby' => 'slug'.
It will work. Check get_categories

1
  • Thanks! I swear I tried that, but of course I tried it again and it is working just fine. Appreciate the answer.
    – user44499
    Commented Dec 31, 2013 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.