I’m creating a parent theme and several child themes. But how can I prevent the parent theme from ever being used?
Leave a Reply
You must be logged in to post a comment.
I’m creating a parent theme and several child themes. But how can I prevent the parent theme from ever being used?
You must be logged in to post a comment.
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 byDashboard -> 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?
You can’t hide the theme itself, but you can control access to the theme switcher:
http://codex.wordpress.org/Roles_and_Capabilities#switch_themes