Difference between revisions of "WordPress Template Tag"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Example: bloginfo())
(External links)
Line 25: Line 25:
  
 
* [https://codex.wordpress.org/Template_Tags Template Tags]
 
* [https://codex.wordpress.org/Template_Tags Template Tags]
 +
* [https://codex.wordpress.org/Stepping_Into_Template_Tags Stepping Into Template Tags]
 +
  
 
[[Category:WordPress]]
 
[[Category:WordPress]]

Revision as of 21:09, 11 October 2016

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