Directory Categories Dropdown list in Alphabetical Order

Hi, I hope everybody is having a good day.

I'm using the Directory plugin and I installed the plugin Advanced Post Search to create a search form. Everything is working fine, but for some reason there are some words out of the Alphabetical Order and that's confusing for the user.

Hope you guys can help me as always.

See the image attached



  • Predrag Dubajic
    • Support

    Hey @jose,

    Hope you’re doing well today :slight_smile:

    Could you try going to Listings > Listings Category and open categories that are not in place and check their slug, if it’s different from name and starts with different letter it’s possible that categories are sorted by slug instead of by name.

    Best regards,


  • Adam Czajczyk
    • Support Gorilla

    Hey Jose,

    I hope you’re well today!

    I’m pretty sure that you’re referring to a custom shortcode patch that I gave you in this post:

    The code itself doesn’t affect the way of how the categories are pulled from the database by the plugin. What it does, is simply omitting the child categories while printing form to the screen.

    That said, I suspect that this is due to the national characters included in some words. This may need a special “treatment” on the code side. To check this I’d like to ask you to revert for a moment to a original shortcode that you’ve used to display this form instead of the one I provided you with. Could you please do this and let me know if the same issue occurs?



  • Jose
    • The Incredible Code Injector

    Hi @adam Czajczyk

    Removing the code it didn’t work, but I found a quick fix.

    If I manually remove and recreate the categories that are out of order, they get in order. This works for me.

    But of course if the website have 10,000 categories and each one have 5,000 listings this is not an option.



  • Adam Czajczyk
    • Support Gorilla

    Hey Jose,

    It’s great to know that you’ve found the solution!

    Thanks for testing the thing with original code, fortunately this confirmed that my alternative shortcode isn’t causing the problem here :slight_smile:

    One more thing that comes to my mind is that perhaps this was a “one-time” issue. I’ll keep an eye on this though.

    Thanks for information and have a great day!


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.