I know if I had a page that had a permalink such as /stories/
then I could create a page in my template called page-stores.php
and it would load in place of the default page.php
when that page loaded (see Template Hierarchy)
What I want to know is if I had that two page templates, maybe page.php
and page2.php
, if I could use the functions.php
file to specify that if a page had a permalink of /stories/
it would use page2.php
?
I know there is an option when editing a page to let the end user choose the page template, but in this case I would like to set it specifically.
This might work: