Understanding template tags

Template tags are most commonly used in templates to help you retrieve or "get" information from your WordPress CMS into your theme design. They can also be used to include or call in other template files.

The bloginfo tag was a typical example of a template tag that can be passed a parameter. In the previous section, we passed it the stylesheet_url parameter, to make sure we targeted our style.css page, but in other parts of our template we may wish to pass that template tag the name parameter or the version parameter. It's up to you where and how you might want to use a template tag. Template tags occasionally can be used to execute commands or do something.

Was this article helpful?

0 0

Post a comment