WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get template

Description

Retrieves the directory name of the current theme, without the trailing slash.

In the case a child theme is being used, the directory name of the parent theme will be returned. Use get_stylesheet() to get the directory name of the child theme.

Usage

<?php get_template() ?>

Parameters

This tag has no parameters.

Return Values

(string) 
Directory name of the current theme (without the trailing slash). Its the same as the name of the theme..

Examples

For example, if your current active theme is named 'heli', then: <?php echo get_template() ?> will output heli

Notes

Change Log

Since: 1.5.0

Source File

get_template() is located in wp-includes/theme.php, line 241.

Related

Theme paths: get_template(), get_template_directory(), get_template_directory_uri(), get_theme_roots(), get_theme_root(), get_theme_root_uri(), get_stylesheet(), get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo(), get_theme_file_uri(), get_theme_file_path()

See also index of Function Reference and index of Template Tags.