模板文件(Template Files)

草稿

原文:https://developer.wordpress.org/themes/basics/template-files/

模板文件(Template Files)

Template partials

Partial and Miscellaneous Template Files

Template files are used throughout WordPress themes, but first let’s learn about the terminology.

两个函数:

get_template_part

Post Template Files

Post Template Files

List of Template Tags

List of Template Tags

Linking Theme Files & Directories

通用模板文件

  • style.css
  • index.php
  • front-page.php
  • home.ph
  • header.php
  • singular.php
  • single.php
  • single-{post-type}.php
  • archive-{post-type}.php
  • page.php
  • page-{slug}.php
  • category.php
  • tag.php
  • taxonomy.php
  • author.php
  • date.php
  • archive.php
  • search.php
  • attachment.php
  • image.php
  • 404.php
  • comments.php
  • rtl.css