I'm creating a parent theme and several child themes. But how can I prevent the parent theme from ever being used?

  • It might help get a better answer if you explain your use case of not wanting the parent theme from ever being used.
    – Chris_O
    Apr 28, 2011 at 11:34
  • I'm guessing that he doesn't want anyone to be able to select the parent theme from the Themes admin selection page.
    – anu
    Apr 28, 2011 at 12:52
  • The parent theme provides common functionality for all the child themes - say 90% of the templates. But it wouldn't make sense to use it on its own. Apr 28, 2011 at 17:24
  • sounds like "abstract themes" Jul 31, 2013 at 6:08

3 Answers 3


Not using the current system. In order to serve as a valid Template for a Child Theme, the Parent Theme must exist, and be a valid Theme. That's because the Parent Theme's template files must be accessible via locate_template(), in order for the Child-Parent fallback to work properly.

Note: if this core Trac ticket is implemented, then you'll be able to filter locate_template(), which would conceivably enable you to put your Parent Theme in a separate location, not accessible by Dashboard -> Appearance -> Themes.


would - by ensuring the child theme had all the same template pages as the parent and by not including the @import of the parent css - be too dumb of an answer?

  • that's an interesting approach, but then you start to lose the benefits of having a parent theme at all - at some point you might as well just clone the theme and make changes directly!
    – anu
    Apr 28, 2011 at 12:53
  • You have to get creative & interesting in order to achieve something you have no knowledge of how to do lol Apr 28, 2011 at 15:32

You can't hide the theme itself, but you can control access to the theme switcher:


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.