I have a group of themes that a client needs consolidated into one. Everything is fairly straight forward, except each theme has theme-specific page templates. Instead of pooling all the template files together in the new master theme, how can I reduce them down to one dynamic template that displays differently depending on a chosen theme option?
When searching myself I came across the template_include filter, which looks like it could be used to override the template that is used, but I’m not sure this is the right solution or how it would be implemented in this case.
Another idea I have would be to just use conditional includes inside the “master” template.
Any suggestions would be much appreciated.
Personally, I build everything within index.php of each template. I then do conditional checks.
Example:
Read more on conditional tags.