![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
#1
IP: 112.87.85.4
|
|||
|
|||
|
在编写主题模板时,有一些资料的帮助,相信大家在DIY模板时,更能得心应手。
说明:以下wordpress 最先访问1.,若未发现1则访问2.,若仍未发现2.,则访问3.,依次类推。 一、首页显示次序: 1. home.php 2. index.php 二、单页显示: 1. single.php 2. index.php 二、页面显示: wordpress 页面: 1. pagetemlate.php – “page-slug/page-id”是你特定的页面模板文件. 2. page.php 3. index.php 三、分类显示: 分类模板: 1. category-slug.php – 如果分类的slug(标题)是news,则wordpress将访问category-news. 2. category-id.php -如果分类的ID(编号)是6,则wordpress将访问category-6. wordpress2.3以上版本已经取消ID设置,如果你需要的话,可以在分类URL地址栏中自行添加cat_ID。 3. category.php 4. archive.php 5. index.php (注:category-slug.php在2.9版支持。) 当无category-slug.php时,wordpress将访问category-id,若仍未发现,现访问category.php,依次类推。 四、标签显示: 1. tag-slug.php -如果标签的slug(标题)是news,则wordpress将访问tag-news. 2. tag-id.php -如果分类的ID(编号)是6,则wordpress将访问category-6. 3. tag.php 4. archive.php 5. index.php (注:tag-id.php 将在2.9版支持) 五、作者显示: 模板文件: 1. author.php 2. archive.php 3. index.php 六、日期显示: 归档(日期)模板: 1. date.php 2. archive.php 3. index.php 七、搜索显示: 创建搜索模板: 1. search.php 2. index.php 八、404(未找到)显示 创建错误404模板: 1. 404.php 2. index.php 九、附加显示 附加模板: 1. MIME_type.php -可以是任意形式的媒体模板(如image.php”图片”,video.php”视频”,audio.php”音频”,application.php”应用程序”等) 2. attachment.php 3. single.php 4. index.php 版本说明: 2.9 支持category-slug.php, tag-id.php 2.? 支持attachment pages 2.3 支持Tag(标签), Pages(页面) |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Steps to Change Your Table Prefix in WordPress | Abby | WordPress | 0 | 2014-04-14 03:40 PM |
| Install WordPress on IIS | topvip | Blog(博客)/Wiki(维客)/RSS/Cms | 1 | 2010-01-25 08:31 PM |
| 让wordpress首页显示特殊页面(flash首页等) | yahoo | Blog(博客)/Wiki(维客)/RSS/Cms | 0 | 2009-02-25 06:58 AM |
| wordpress 搜索引擎优化的二十条实用技巧 | car | 搜索引擎优化 | 0 | 2008-03-11 08:33 AM |
| WordPress 中文包 | sunshine | Blog(博客)/Wiki(维客)/RSS/Cms | 0 | 2007-03-12 10:16 AM |