WordPress at a glance

get_template() WP 1.0

Retrieve name of the current theme.

Works based on: get_option()
Hooks from the function
Return

String. Template name.

Usage

get_template();

Changelog

Since 1.5.0 Introduced.

Code of get template: wp-includes/theme.php WP 5.2.2

<?php
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' ) );
}

Related Functions

From tag: path (directory folder)

More from category: Other Theme Functions

No comments
    Hello, !     Log In . Register