Difference between revisions of "WordPress Template"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Template hierarchy)
Line 24: Line 24:
  
 
See [[WordPress Template hierarchy]]
 
See [[WordPress Template hierarchy]]
 
See [https://developer.wordpress.org/themes/basics/template-hierarchy/ Template hierarchy] @ codex.wordpress.org.
 
  
 
== See also ==
 
== See also ==

Revision as of 07:14, 5 October 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 Templates 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 also

External links