Difference between revisions of "WordPress Template"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
m (Karl Jones moved page WordPress template to WordPress Template)
(No difference)

Revision as of 22:30, 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