Child Theme Template Files

Want to hear something cool? A template file in a child theme behaves just like the style.css file in that it overrides the corresponding file in the parent theme. The only difference is that a child theme’s template file replaces the parent theme’s template file as opposed to working with it.

This means that if you want a special single post layout for your Volatyl child theme, you can simply include a content-single.php file in your child theme’s /templates folder and WordPress will use that template instead of the corresponding Volatyl template.

All Volatyl templates are kept in their own directory called templates which is in the root of the Volatyl folder. So, all template files are located as such: volatyl/templates/template-file.php

For a head start (recommended), simply copy the corresponding file from the core Volatyl templates folder, templates/content-single.php for example, and only make the adjustments you want for your child theme. Then, place that file into your child theme’s templates folder and it will override Volatyl’s corresponding file with your changes.

Likewise, if Volatyl does not have a particular template file, creating that file in the child theme will make it work just as if it was included in Volatyl.

Sweet deal!

Return to docs