Base-* file is not being used for custom/page templates

I’m trying to create a second base.php file for use with a specific template. In the base roots-master folder I’ve created “template-test.php” and “base-test.php”. After setting a page to use template-test the debug output is:

The Main template being used is: /roots-master/template-test.php
The Base template being used is: /roots-master/base.php

The same goes for “page-about.php” and “base-about.php”:

The Main template being used is: /roots-master/page-about.php
The Base template being used is: /roots-master/base.php

Am I missing something obvious about manipulating the theme wrapper?

2 Likes

Yes.

You take the full name of the template and prepend base-. So for your examples you need base-template-test.php and base-page-about.php.

2 Likes

@tron Just curious, which debugging tool are you using?

It looks like it was copied from here:
http://discourse.roots.io/t/incorrect-base-wrapper-being-used-im-at-a-loss/648/2

I have a plugin that does the same thing, but neater. I just haven’t got round to releasing it yet.