I'd like to store the page templates for my theme in their own directory, /pages/ for example.

I'd also like to utilize the page-{slug}.php functionality of the Template Hierarchy, and not have to set my page templates manually in the WP dashboard.

There doesn't seem to be a filter for where WP looks up the page templates, as far as I can tell.

1 Answer 1


It is tricky. I found the answer within a different thread here.

WordPress Custom Page Template in a different directory

  • Rather mark posts as duplicates than simply just posting a link to a question with an answer Aug 25, 2015 at 4:33
  • Got it! I was not aware about it. Actually I am making my self familiar with this great website.
    – Sabbir H
    Aug 25, 2015 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.