Title: WP_Customize_Manager::get_template
Published: April 25, 2014
Last modified: February 24, 2026

---

# WP_Customize_Manager::get_template(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#wp--skip-link--target)

Retrieves the template name of the previewed theme.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#return)󠁿

 string Template name.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#source)󠁿

    ```php
    public function get_template() {
    	return $this->theme()->get_template();
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-manager.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-manager.php#L2277)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-manager.php#L2277-L2279)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Customize_Manager::theme()](https://developer.wordpress.org/reference/classes/wp_customize_manager/theme/)`wp-includes/class-wp-customize-manager.php` |

Gets the theme being customized.

  |

| Used by | Description | 
| [WP_Customize_Manager::get_template_root()](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template_root/)`wp-includes/class-wp-customize-manager.php` |

Retrieves the template root of the previewed theme.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_manager/get_template/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_manager%2Fget_template%2F)
before being able to contribute a note or feedback.