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

up vote 5 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.

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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