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

In web development, I get used to place css/js files under separate folders (css folder, js folder ..etc).

What I am experiencing in WordPress is that I cannot access these folders in WordPress Admin Editor Page, the editor only displays the files under the main theme folder, not the nested folders.

Is there an option to enable showing nested folders? is there a plugin to accomplish that? If not, then what is the best practice to follow for placing files and folders under WordPress folder?

share|improve this question
up vote 1 down vote accepted

The theme editor is located under /wp-admin/theme-editor.php and uses get_current_theme(); to give you the first files to edit. From the returned array of theme data, it uses 'Template Dir' to locate the directory and 'Template Files' to give you a list of files to edit (loops through the files with a foreach loop). For stylesheets it uses 'Stylesheet Dir' and 'Stylesheet Files' to loop through.

Point is that:

1. there are no filters or hooks, so you'd need to modify core directly (which is not recommended, as your changes would be overwritten on update) and

2. you'd need to write a function that reads the whole folder, finds all subfolders and then another one to find all containing files and last loop through them too.

share|improve this answer
Okay, so there is no plugin already built to address this functionality? – Ahmad Alkhawaja Oct 9 '11 at 17:18
No and no: No plugin and no action filter/hook to use a plugin. – kaiser Oct 9 '11 at 17:29
Thank you very much :) – Ahmad Alkhawaja Oct 9 '11 at 18:57

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.