Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm running a multisite network with 100+ themes installed and activated. Is there a way to manipulate the list of available themes in wp-admin so that certain themes appear in the list first? (a kind of "Featured" or "recommended") After the first 9 or so alphabetical as default would be fine.

Obviously Googling the words "wordpress" and "themes" has been pretty fruitless in this case.

share|improve this question
add comment

2 Answers 2

Probably not without editing core files. I haven't found any hook you could use.

If you look in the file wp-admin/themes.php and follow the program flow until the list of themes will be displayed, you can find the class WP_Themes_List_Table in wp-admin/includes/class-wp-themes-list-table.php.

This class generates the HTML list. Following the prepare_items() method, WordPress get the list of available themes from the function get_themes() which doesn't have a hook either.

What you can do is limit the result to allow only certain themes with the filter allowed_themes called in the function get_allowed_themes().

share|improve this answer
    
Yeah this seems to be the case. Thanks for researching it though. –  Dunhamzzz Sep 27 '11 at 8:02
    
I worked it out! See my answer –  Dunhamzzz Sep 27 '11 at 13:12
add comment
up vote 0 down vote accepted

Came up with a silly but effective measure to get certain themes at the front of the list. Because themes are listed alphabetically, it was possible to manipulate the output by changing the theme name, specifically by adding a symbol to the front of the theme name it will appear at the start of the list.

I settled for a non-breaking-space   as it didn't effect the name visually. You could also try invisible ascii characters. HTML is stripped so don't bother trying that.

/*
Theme Name:  Ribbon
Description: A customisable theme
share|improve this answer
add comment

Your Answer

 
discard

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.