Alternate base.php fails to load

Hi All,

Firstly, awesome base theme, i’m hopefully looking forward to using this work regularly,

I have what appears to be a simple issue, I did check other posts to see if I could resolve this but the suggested answers don’t seem to make any difference,

My problem is this, I have pretty much a standard install of roots with the custom template example still intact, I would like to have a different base load when I hit a simple contact form, I’ve created template-contact-us.php, content-contact-us.php and base-contact-us.php and confirmed that the file permissions allow them to be read, the page slug is contact-us and the correct template is set in wordpress admin,

However, my content-contact-us and template-contact-us seem to work fine but the base-contact-us.php never gets loaded, it always seems to revert back to the base.php instead,

I have read everything I can find regarding this and the way I understand it is that if the base-contact-us.php file exists then it should be used in preference over the base.php file or maybe I have this wrong?

Any pointers with this would be greatly appreciated


1 Like

You take the name of the template and add the base- prefix. So base-template-contact-us.php will work. The rest you seem to have understood correctly.

Ahh of course,

So simple yet so easy to miss the template,

Many thanks for clarifying that @Foxaii, it may not be a bad idea to amend your blog post to provide a real world example of this? I read it 4 or 5 times and still managed to miss that,

Thanks again :slight_smile: