If you look hard enough you can fiind anything online! Even elusive snippets of code to customise your wordpress admin area.
I’m building a site using lots of templates so I’ve got more editing control locally so I wanted to list my templates dropdown list in the wordpress admin area in alphabetical order.
I searched wordpress.org and only found one unanswered post on the subject.
I dug a littel deeper and found this page:
http://trac.wordpress.org/attachment/ticket/2926/2926.diff
It reveals a snippet of code:
ksort($templates);
You have to insert it in the admin_functions.php file in the wp_admin folder near the page_template_dropdown function.
I’ve done it and it works a treat! Sorts those templates!
Email This Post
Any information shared on UKMoneyPot does not constitute financial advice. The Website is intended to provide general information only and does not attempt to give you advice that relates to your specific circumstances. You are advised to discuss your specific requirements with an independent financial adviser.