O'Reilly logo

WordPress® Bible by Aaron Brazell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Template Tags

IN THIS APPENDIX

  • Understanding the template tag concept

  • Breaking down the WordPress templating system

Templating systems have existed for a long time and have become a major part of most content management systems. The concept behind templating systems is that raw code is abstracted for the sake of ease of design and clean code for designers.

Understanding the Template Tag Concept

One of these templating systems include the Smarty template system (www.smarty.net/), which uses curly braces to designate a template tag (for example, {include file='header.php'}). Additionally, many would consider PHP itself a templating system of sorts.

Each of the blog platforms that compete with WordPress also include template systems that assist in maintaining clean and easily understood themes. For example, Blogger uses tags similar to <$BlogOwnerProfileURL$&> and Movable Type uses tags like <$mt:AuthorDisplayName$&>.

Breaking Down the WordPress Templating System

WordPress has its own set of template tags. This appendix has been created as a reference to all of the template tags available to theme developers along with all Arguments that can be used.

Note

For more on template tags, see Chapter 12.

Many of the template tags listed here can take either an array of Arguments or a query string. An array of Arguments might look like this:

template_function (array ('arg1' =&> 'val1', 'arg2' =&> 'val2'))  ;

The same set of Arguments in a query string would look like this:

template_function ('arg1=val1&arg2=val2') ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required