source: trunk/www.guidonia.net/wp/wp-content/themes/carrington-mobile-1.0.2/pages/README.txt@ 44

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 1.1 KB
Line 
1## pages/
2
3WP doesn't support page templates in nested folders like this one, so page organization isn't as clean as we'd like.
4
5Create a page in the theme root:
6
7File name: page-example.php
8
9**Note:** We recommend prefixing all of your page files with 'page-' so that they are easily sorted together in your theme directory.
10
11File contents:
12
13 <?php
14
15 /*
16 Template Name: Example Template
17 */
18
19 if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
20 if (CFCT_DEBUG) { cfct_banner(__FILE__); }
21
22 cfct_page('example');
23
24 ?>
25
26This will then load 'example.php' from the _pages/_ directory, keeping all of your actual page code nicely organized in one spot.
27
28You can also add your page code to the page-example.php file you create in the theme root, but we're hoping to get support for pages in a sub-directory in a future version of WordPress so we are starting with what we consider to be a "proper" organization structure now.
29
30
31### Supported Filenames
32
33- pages-default.php (or default.php)
34
35
36### File Descriptions
37
38A "default" template is required. You can create other templates as desired.
39
Note: See TracBrowser for help on using the repository browser.