[wp-hackers] Problems recognising templates in the file system
wphackers at jakemgold.myfastmail.com
Wed Jul 14 16:34:05 UTC 2010
That should answer most of your questions.
If you're referring to custom page templates, pages are assigned meta
data with the script name of the template files. If you rename the
template, all current page's assigned that template will "lose" their
In theory, you could write some code that checks that meta data value
for an old template and updates it with the new script name. Of course,
for smaller sites, that's probably silly compared with just reassigning
the template and update the pages.
On 7/14/2010 7:31 AM, Kris Young wrote:
> Are there strict requirements from WordPress in regards to identifying
> and using templates within the file system? Two problems have come up
> since trying to organise my file structure a little better - I'm a
> stickler for tidy dev environments, and comprehensive file structuring.
> Arranging templates into a new folder under the root theme folder has
> stopped WP from recognising them. The same goes for moving them back
> into the default theme folder and renaming those templates with a hyphen
> (so template-blog.php, rather than with an underscore). Undoing both of
> these changes fixes the problem, but I want either of those two changes
> I made to stand. Preferably both, actually.
> Any way around this problem?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers