PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Sort order of category dropdown

  1. Hi,

    I am trying to find a way to change the way the category dropdown is being sorted in the form display; for example, I would like the sort order to be 'slug' instead of the (default?) 'name'.

    Is there a way to do this without hacking core files?

    thx in advance!

    Posted 14 years ago on Monday August 9, 2010 | Permalink
  2. Currently there is no way to change the sort order of the Category drop down. It would require hacking core files to do so, which we don't recommend as it makes upgrades problematic.

    Posted 14 years ago on Tuesday August 10, 2010 | Permalink
  3. I thought so :-\

    Thx fot the quick reply Carl!

    As long as this hook isn't there, I wouldn't mind to hack 2 lines of source code to get this functionality, and having to do it again after upgrading.

    I did find the way to change the sort order when no category is selected in the form field settings (line 1158 in common.php), but that does not work when any category is selected (I am not that familiar with php: think it's the sprintf() in 1163 where I lose it).

    I do realize that it's quite uncommon to ever need this kind of hack, but client's wishes sometimes are very exceptional and I can't think of any other way to accomplish what he wants...

    Posted 14 years ago on Tuesday August 10, 2010 | Permalink

This topic has been resolved and has been closed to new replies.