Is there support for page templates in 'page-templates' subdirectory?

As of WP 3.4, I believe Wordpress supports placing page templates in a ‘page-templates’ subdirectory. However, creating slug-based templates (‘page-my-new-page.php’, eg.) doesn’t seem to do anything in Roots. Am I missing something with the Roots Wrapper?

I believe this is a case of the WordPress terminology being confusing.

In WordPress, custom page templates are the ones manually set in the WordPress dashboard, not the ones selected by the template hierarchy/wrapper. You can read more about them here but they should work fine in Roots.

Thanks for the response! If I understand this correctly, what you’re saying is that WP will allow you to use a custom subdirectory ‘page-templates’ to store custom templates that you call from the dashboard, but WP will not crawl the ‘page-templates’ subfolder looking for templates that match the ‘page-{slug}.php’ format from the Template Hierarchy. Correct?

If so, I’d be curious to know if there are any more elegant solutions to managing a few dozen static HTML pages using the Roots Wrapper, ideally calling content templates by slug. We have a number of legacy pages that need to stay up but don’t have any content in the database. I was hoping to create a subfolder to hold a bunch of ‘page-{slug}.php’ templates, but it looks like I might need to add a long series of switch/case statements to ‘page.php’ and store the HTML for the content blocks in ‘/templates/static-pages/content-{slug}.php’ files. Was hoping to avoid the switch logic to simplify handling the possible addition of new static pages in the future.

Yes, you’ve understood my explanation.

I would probably add a category or custom field to the legacy posts and modify roots_template_path() to check in the subfolder for the appropriate template.

That was the way to go - using a tag was much faster than setting up a custom template. Thanks!