WordPress Template

From Wiki @ Karl Jones dot com
Revision as of 21:30, 5 September 2016 by Karl Jones (Talk | contribs) (Karl Jones moved page WordPress template to WordPress Template)

Jump to: navigation, search

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