WordPress Template
In WordPress, a template is a PHP document which controls how WordPress content is displayed.
Templates are part of WordPress themes.
Contents
Template file names
Templates have specific file names, and each file has a specific purpose.
index.php
All themes must include a template file named index.php
. This is the fundamental template for any theme.
How template work
Template files draw information from your WordPress MySQL database and generate the HTML code which is sent to the web browser.
Template hierarchy
All themes must include the template file named index.php
.
Additional WordPress templates form a hierarchy, with rules about which template applies in a given situation.
Some templates override other templates. This varies according to which templates you use, and how you use them.
See WordPress template hierarchy
See Template hierarchy @ codex.wordpress.org.
See also
External links
- Templates @ codex.wordpress.org
- Template Files @ developer.wordpress.org
- Stepping Into Templates @ codex.wordpress.org