On this page
WP_Theme::get_template(): string
Returns the directory name of the theme’s “template” files, inside the theme root.
Description
In the case of a child theme, this is the directory name of the parent theme.
Otherwise, the get_template() is the same as get_stylesheet() .
Return
string Template
Source
File: wp-includes/class-wp-theme.php. View all references
public function get_template() {
return $this->template;
}
Related
Used By
| Used By | Description |
|---|---|
| WP_Theme::__get() wp-includes/class-wp-theme.php | __get() magic method for properties formerly returned by current_theme_info() |
| WP_Theme::offsetGet() wp-includes/class-wp-theme.php |
Changelog
| Version | Description |
|---|---|
| 3.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme/get_template