WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been searching for a hook to change the order in which themes are displayed in the admin panel (i.e. wp-admin/themes.php) but so far haven't been successful.

Is there an existing hook to do this, or another workaround so I can have a custom non-alphabetical ordering - i.e. have certain themes display before the rest?

share|improve this question
up vote 3 down vote accepted

The get_themes function passes the available themes to the theme list table class and is hardcoded with a call to asort the array, with no filters available anywhere along the way that i can see.

So in short, not possible at present due to an absence of hooks(at least as far as my observations go).

Relevant files:

share|improve this answer
Thanks, this is what I was dreading - would it be possible/practical to extend the core and add a custom hook to the get_themes function? – Adam Dec 12 '11 at 15:28
Add a custom hook how? Short of modifying core files, i can't see how you could, else i'd have suggested it. :) – t31os Dec 12 '11 at 16:16
Yep, I'd have to modify the core file wp-includes/theme.php – Adam Dec 12 '11 at 16:18
Sure you could do that, it's just not one of those things we tend to recommend(because you're going to lose those mods with each update, and it's important to keep WP upto date). – t31os Dec 12 '11 at 16:21
Ok, thanks for the help, I'll possibly do this as a short-term measure and hope that WP add a hook in the future! – Adam Dec 12 '11 at 16:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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