What is meaning of a Template Tag in WordPress

A template tag is code that instructs WordPress to “do” or “get” something. In the case of the header.php template tag for your WordPress site’s name, it looks like this:

<?php bloginfo(‘name’); ?> // this will print the blog name

Following are the more public methods.

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

As mentioned, this displays the name of the site and is set by the administrator in the Options > General SubPanel by default.

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

This is called the “Tagline” for your blog which is usually some kind of descriptive sentence that says “My blog is about….”. It is set by the administrator in the Options > General SubPanel.

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

When you want to display the URL or website address for your WordPress site, you can use URL and it will show up. This also comes from the Options > General SubPanel.

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

If you want to display the email of the administrator, you don’t have to type it into the template files. By doing so, it may be open to email harvesters who use sophisticated software to come in and grab email addresses to use for spam. By using bloginfo('admin_email'), the email is displayed on the page for the viewers, but the actual email address is disguised from the harvesters. Nice, huh? The administrator’s email address is set in the Options > General SubPanel.

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

Sometimes you’d like to show off which version of WordPress you are using. The Themes that come with WordPress by default include this information in the footer template. It simply displays the version of WordPress your blog uses.

WordPress is most powerful tool for SEO and bloggers. We all need the custom theme for our projects. When we are creating the custom wordpress theme then functions.php file is so important.

Here is the detailed information about functions.php file. Using this file we can override the wordpress functions or methods and create custom method for our theme requirement.

A theme can optionally use a functions file, which resides in the theme subdirectory and is named functions.php. This file basically acts like a plugin, and if it is present in the theme you are using, it is automatically loaded during WordPress initialization (both for admin pages and external pages). Suggested uses for this file:

  • Define functions used in several template files of your theme
  • Set up an admin screen, giving users options for colors, styles, and other aspects of your theme

The “Default” WordPress theme contains a functions.php file that defines functions and an admin screen, so you might want to use it as a model. Since functions.php basically functions as a plugin, the Function_Reference list is the best place to go for more information on what you can do with this file.

Wordpressapi is developer code book.
wordpressapi on Facebook

Who am I?

Sony Kumari founded Wordpressapi in Feb 2010. She started writing since Aug 2006 in wordpress blog. Later on She moved her blog to wordpressapi.com.

Sony Kumari is dubble gradute and earned M.C.A. in Computers. Sony Kumari handled the so many projects in many different technology. She worked on Java, PHP, Ruby on Rails, Javascript, Web services, Social applications, Ad campaigns.

Mahesh is the Author of Wordpressapi, as well as a serial web entrepreneur, sci-fi author, and aspiring world changer. He has been writing for Wordpressapi since Dec 2009. His previous experience includes Photoshop Design, CSS design, Web design and wordpress themes development.

Mahesh is a graduate and earned a B.E. in Electronics. He is having three years of experience in Web design and Wordpress application development.

Rahul is the Author of Wordpressapi, as well as a web designer and photoshop artist. His previous experience includes Photoshop Design, CSS design, Web design and wordpress themes development.

Rahul is a graduate and earned a B.A. in History. He is having Five years of experience in Web design and Wordpress application development.

© 2010 Wordpressapi. All Rights Reserved. Reproduction without explicit permission is prohibited.