I've setup a few custom widgets for my theme, and when I go into Appearance > Editor, the widget file names are showing up in the list of files that can be edited.

How can I prevent these widget file names from showing up in the Editor's list of files? I put them in a subdirectory ("widgets"), but they are still showing up on the list with the main pages.

1 Answer 1


The editor won't traverse more than one directory deep, so a simple way to hide them is to put them in a dir within a dir:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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