I’m currently building a custom theme/site that has LOTS of page templates. I find that to be the easiest way to make really intricate pages to my custom sites. For more info on how to create a page template, Carrie Dils already has a nice tutorial here.
My issue was that I had so many page templates that it was making my custom child theme feel really bloated and disorganized. I tweeted about how I wished I could put my page templates in a subdirectory in my theme and Justin Sainton came to the rescue!
@JiveDig you can.
— Justin Sainton (@JS_Zao) October 17, 2014
He went on to link to Nacin’s post about it’s addition to WP core. I had tried other methods before, but I never used the directory name of /page-templates/. How simple is that?!?!?!
Name your subdirectory correctly!
So the answer to the question is simple…
Create a directory in your Genesis child theme called /page-templates/ or just /templates/ and put all your page templates in there!
I feel so organized.
Thanks to Justin and Nacin!
Paal Joachim Romdahl says
Yeah I too found Nacin’s post some time ago. It sure makes for less clutter having a folder to place the page templates into.
Perhaps you could post some of your page templates showing the result and code?
Have a great day!
Most of my templates are site specific.. but I hope to share some more general stuff in the future. Thanks for checking it out though!