Difference between revisions of "WordPress Template"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
Line 1: Line 1:
In [[WordPress]], a '''template''' is a [[PHP]] document which controls how your WordPress site will be displayed on the web.
+
In [[WordPress]], a '''template''' is a [[PHP]] document which controls how [[WordPress content]] is displayed.
  
 
Templates are part of [[WordPress theme|WordPress themes]].
 
Templates are part of [[WordPress theme|WordPress themes]].
Line 30: Line 30:
  
 
* [[WordPress]]
 
* [[WordPress]]
 +
* [[WordPress content]]
 
* [[WordPress template hierarchy]]
 
* [[WordPress template hierarchy]]
 
* [[WordPress theme]]
 
* [[WordPress theme]]

Revision as of 18:05, 5 September 2016

In WordPress, a template is a PHP document which controls how WordPress content is displayed.

Templates are part of 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 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