独立主题需要有index.php模板文件,wordpress 主题模板文件列表及其作用
wordpress 主題模板文件列表及其作用
主頁:
1.home.php
2.index.php
文章頁:
1.single-{post_type}.php – 如果文章類型是videos(即視頻),WordPress就會去查找single-videos.php(WordPress 3.0及以上版本支持)
2.single.php
3.index.php
頁面:
1.自定義模板 – 在WordPress后臺創(chuàng)建頁面的地方,右側(cè)邊欄可以選擇頁面的自定義模板
2.page-{slug}.php – 如果頁面的縮略名是news,WordPress將會查找 page-news.php(WordPress 2.9及以上版本支持)
3.page-{id}.php – 如果頁面ID是6,WordPress將會查找page-6.php
4.page.php
5.index.php
分類:
1.category-{slug}.php – 如果分類的縮略名為news,WordPress將會查找category-news.php(WordPress 2.9及以上版本支持)
2.category-{id}.php -如果分類ID為6,WordPress將會查找category-6.php
3.category.php
4.archive.php
5.index.php
標(biāo)簽
1.tag-{slug}.php – 如果標(biāo)簽縮略名為sometag,WordPress將會查找tag-sometag.php
2.tag-{id}.php – 如果標(biāo)簽ID為6,WordPress將會查找tag-6.php(WordPress 2.9及以上版本支持)
3.tag.php
4.archive.php
5.index.php
作者:
1.author-{nicename}.php – 如果作者的昵稱為rami,WordPress將會查找author-rami.php(WordPress 3.0及以上版本支持)
2.author-{id}.php – 如果作者ID為6,WordPress將會查找author-6.php(WordPress 3.0及以上版本支持)
3.author.php
4.archive.php
5.index.php
10
日期頁面:
1.date.php
2.archive.php
3.index.php
11
搜索結(jié)果
1.search.php
2.index.php
12
(未找到)頁面
1.404.php
2.index.php
13
附件頁面
1.MIME_type.php – 可以是任何MIME類型 (image.php, video.php, audio.php, application.php 或者其他).
2.attachment.php
3.single.php
4.index.php
總結(jié)
以上是生活随笔為你收集整理的独立主题需要有index.php模板文件,wordpress 主题模板文件列表及其作用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 女子选中尾号555车牌后变号!车管所:系
- 下一篇: php和web服务器,php与web服务