WordPress Template Tag

From Wiki @ Karl Jones dot com
Revision as of 17:54, 25 October 2016 by Karl Jones (Talk | contribs) (See also)

Jump to: navigation, search

In WordPress, Template Tags are units of PHP code used within WordPress Templates to display various types of information.

Not to be confused with HTML tags, which also appear in Templates.

Example: bloginfo()

The code below displays the name of the blog:

<?php bloginfo('name'); ?>

It is often used in the header.php file, along with HTML, like this:

<h1><?php bloginfo('name'); ?></h1>

See also

External links