Difference between revisions of "WordPress Template"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
Line 41: Line 41:
  
  
[[Category:Computer programming]]
 
[[Category:Computer science]]
 
[[Category:Computing]]
 
[[Category:Web design and development]]
 
 
[[Category:WordPress]]
 
[[Category:WordPress]]

Revision as of 08:04, 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 Template hierarchy @ codex.wordpress.org.

See also

External links