Difference between revisions of "WordPress Template"
Karl Jones (Talk | contribs) (Blanked the page) |
Karl Jones (Talk | contribs) |
||
Line 1: | Line 1: | ||
+ | In [[WordPress]], a '''template''' is a [[PHP]] document which controls how your WordPress site will be displayed on the web. | ||
+ | Templates are part of [[WordPress theme|WordPress themes]]. | ||
+ | |||
+ | == 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 <code>index.php</code>. This is the fundamental template for any theme. | ||
+ | |||
+ | == How template work == | ||
+ | |||
+ | Template files draw information from your [[WordPress database|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 <code>index.php</code>. | ||
+ | |||
+ | 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 [https://developer.wordpress.org/themes/basics/template-hierarchy/ Template hierarchy] @ codex.wordpress.org. | ||
+ | |||
+ | == See also == | ||
+ | |||
+ | * [[WordPress]] | ||
+ | * [[WordPress template hierarchy]] | ||
+ | * [[WordPress theme]] | ||
+ | |||
+ | == External links == | ||
+ | |||
+ | * [https://codex.wordpress.org/Templates Templates] @ codex.wordpress.org | ||
+ | * [https://developer.wordpress.org/themes/basics/template-files/ Template Files] @ developer.wordpress.org | ||
+ | * [https://codex.wordpress.org/Stepping_into_Templates Stepping Into Templates] @ codex.wordpress.org | ||
+ | |||
+ | |||
+ | [[Category:Computer programming]] | ||
+ | [[Category:Computer science]] | ||
+ | [[Category:Computing]] | ||
+ | [[Category:Web design and development]] | ||
+ | [[Category:WordPress]] |
Revision as of 18:04, 5 September 2016
In WordPress, a template is a PHP document which controls how your WordPress site will be displayed on the web.
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