Skip to content

初学者园地

初学者园地,这里不只有初学者需要的教程

  • 读书
  • 杂谈
  • 随便转载
  • 网络建站
    • SEO
    • 云主机
    • VPS
    • 虚拟主机
    • 自助建站
  • 软件应用
    • 调试环境
    • 建站程序
      • WordPress
  • 资源
    • 优惠卷
    • 免费空间
  • Toggle search form

WordPress 模板说明

Posted on 2019年6月30日2019年7月3日 By TIPSINCN-4beginnerPoster

index.php

The main template file. It is required in all themes.

style.css

The main stylesheet. It is required in all themes and contains the information header for your theme.

rtl.css

The right-to-left stylesheet is included automatically if the website language’s text direction is right-to-left.

comments.php

The comments template.

front-page.php

The front page template is always used as the site front page if it exists, regardless of what settings on Admin > Settings > Reading.

home.php

The home page template is the front page by default. If you do not set WordPress to use a static front page, this template is used to show latest posts.

header.php

The header template file usually contains your site’s document type, meta information, links to stylesheets and scripts, and other data.

singular.php

The singular template is used for posts when single.php is not found, or for pages when page.php are not found. If singular.php is not found, index.php is used.

single.php

The single post template is used when a visitor requests a single post.

single-{post-type}.php

The single post template used when a visitor requests a single post from a custom post type. For example, single-book.php would be used for displaying single posts from a custom post type named book. The index.php is used if a specific query template for the custom post type is not present.

archive-{post-type}.php

The archive post type template is used when visitors request a custom post type archive. For example, archive-books.php would be used for displaying an archive of posts from the custom post type named books. The archive.php template file is used if the archive-{post-type}.php is not present.

page.php

The page template is used when visitors request individual pages, which are a built-in template.

page-{slug}.php

The page slug template is used when visitors request a specific page, for example one with the “about” slug (page-about.php).

category.php

The category template is used when visitors request posts by category.

tag.php

The tag template is used when visitors request posts by tag.

taxonomy.php

The taxonomy term template is used when a visitor requests a term in a custom taxonomy.

author.php

The author page template is used whenever a visitor loads an author page.

date.php

The date/time template is used when posts are requested by date or time. For example, the pages generated with these slugs:

http://example.com/blog/2014/

http://example.com/blog/2014/05/

http://example.com/blog/2014/05/26/

archive.php

The archive template is used when visitors request posts by category, author, or date. Note: this template will be overridden if more specific templates are present like category.php, author.php, and date.php.

search.php

The search results template is used to display a visitor’s search results.

attachment.php

The attachment template is used when viewing a single attachment like an image, pdf, or other media file.

image.php

The image attachment template is a more specific version of attachment.php and is used when viewing a single image attachment. If not present, WordPress will use attachment.php instead.

404.php

The 404 template is used when WordPress cannot find a post, page, or other content that matches the visitor’s request.

  • About
  • Latest Posts
TIPSINCN-4beginnerPoster
TIPSINCN-4beginnerPoster
Poster at TIPSINCN
初学者园地,这里不只有初学者需要的教程。
TIPSINCN-4beginnerPoster
Latest posts by TIPSINCN-4beginnerPoster (see all)
  • Jetpack 适合你的网站吗? - 2019年7月5日
  • VPS,云主机,虚拟主机,实体服务器有什么区别? - 2019年7月4日
  • 【安全预警】关于Linux TCP "SACK PANIC" 远程拒绝服务漏洞的通知 - 2019年7月4日
Wordpress Tags:wordpress

文章导航

Previous Post: 解决wordpress多站点用离线发布的办法
Next Post: 工欲善其事,必先利其器-使用说明是必读的

归档

  • 2019 年 7 月
  • 2019 年 6 月

近期文章

  • Jetpack 适合你的网站吗?
  • VPS,云主机,虚拟主机,实体服务器有什么区别?
  • 【安全预警】关于Linux TCP "SACK PANIC" 远程拒绝服务漏洞的通知
  • 安装了BBR,网站速度好像是快了那么一些。
  • 业精于勤-专注是成功的基础属性之一

联系

  • 关于
  • 联系信息
  • 隐私政策

近期文章

  • Jetpack 适合你的网站吗?
  • VPS,云主机,虚拟主机,实体服务器有什么区别?
  • 【安全预警】关于Linux TCP "SACK PANIC" 远程拒绝服务漏洞的通知
  • 安装了BBR,网站速度好像是快了那么一些。
  • 业精于勤-专注是成功的基础属性之一

标签

000webhost coupons domain codes freehost free hosting freehosting godaddy hosting codes jetpack promo codes seo template sitebuilder VPS wordpress 专注 业精于勤 主机优惠 习惯 优惠代码 免费 免费主机 免费空间 域名优惠 开源程序 排错 无广告 无限流量 无限空间 有用的书 服务器安全 职业 自助建站 运维

Copyright © 2025 初学者园地.

Powered by PressBook WordPress theme