get_template()
Retrieve name of the current theme.
Description Description
Return Return
(string) Template name.
Source Source
File: wp-includes/theme.php
302 303 304 305 306 307 308 309 310 311 | function get_template() { /** * Filters the name of the current theme. * * @since 1.5.0 * * @param string $template Current theme's directory name. */ return apply_filters( 'template' , get_option( 'template' ) ); } |
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Example
For example, if your current active theme is named
heli
, then:<?php
echo
esc_html( get_template() ); ?>
will output
heli