Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

It's possible to create templates for pages with that:

<?php /* Template Name: Contact */ ?>

This templates are located on the theme folder, right? Is possible to change the default path where WP search for those templates? If I want to make a lot of templates, can I create a folder to put them?

Thanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You can place the page templates wherever you want (also in a separate folder) as long as the files are within the current or parent theme's directory.

UPDATE: Follow this link to get a more detailed information about the Template File Folders: http://codex.wordpress.org/Page_Templates#File_Folders

Take also a closer look at the Page Templates and the default TwentyTwelve Theme: their Custom Page Templates are stored within the page-templates folder.

share|improve this answer
    
Thanks. I didnt know that. –  euDennis Jun 2 '13 at 5:58

With WordPress 3.4 was a change that allowed you to place your custom page templates in a subdirectory of your choice. The subdirectory can be named anything you want, but it needs to be in your active theme's main folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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