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

Last change on this file since 44 was 44, checked in by luciano, 15 years ago
File size: 2.6 KB
Line 
1## header/
2
3The standard _header.php_ file in Carrington is set up to call the `cfct_header()` function, which will choose the appropriate header file from this directory - based on the context of the given page. This can be useful if you want to have pages to have a custom header, or perhaps a certain category to have a custom header.
4
5
6## General Context
7
8When choosing a template to use in the General Context, the Carrington engine looks at the type of request is being fulfilled. It will identify the request as the home page, a category archive, and individual post, etc.
9
10There is additional checking done for single post requests. All options in the Content Context are supported here with a 'single-' prefix added to the file. See specifics below.
11
12A "default" template is required, and will be used when there are no other templates that match a given comment. This could be because no other templates have been created, or because the comment in question doesn't match the templates that are available.
13
14By default, conditions are checked in this order:
15
161. author
172. role
183. category
194. tag
205. single
216. default (home, search, archivem 404, etc.)
22
23This can be altered using the `cfct_general_match_order` hook.
24
25
26### Supported Templates (General Context)
27
28- *{dirname}-default.php* (or default.php) - Used when there are no other templates that match for a given page/post.
29- *archive.php* - Used for date archives or if there are no specific category, author or tag templates.
30- *author.php* - Used for author archive lists.
31- *author-{username}.php* - Used when the post/page is authored by a specific user. For example, a template with a file name of _author-jsmith.php_ would be used for a post/page by user _jsmith_. Any WordPress username can take the place of {username} in the file name.
32- *category.php* - Used for category archive lists.
33- *cat-{slug}.php* - Used fr displaying a given category. The category is matched by the "slug" - for example a post in category "General" (with a category slug of "general") could use a template of _cat-general.php_.
34- *home.php* - Used when on the home page.
35- *page.php* - Used for pages that do not match any other contextual templates.
36- *role-{rolename}.php
37- *search.php* - Used when displaying search results.
38- *single.php* - Used for single post pages.
39- *single-{content context filenames}.php* - Used for single post pages.
40- *tag.php* - Used for tag archive lists.
41- *tag-{slug}.php* - Used for displaying a given tag. The tag is matched by the "slug" - for example a post in tag "News" (with a tag slug of "news") could use a template of _tag-news.php_.
42
Note: See TracBrowser for help on using the repository browser.