Title: WP_Theme::get_stylesheet
Published: April 25, 2014
Last modified: May 20, 2026

---

# WP_Theme::get_stylesheet(): string

## In this article

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

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

Returns the directory name of the theme’s “stylesheet” files, inside the theme root.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_theme/get_stylesheet/?output_format=md#description)󠁿

In the case of a child theme, this is directory name of the child theme.
Otherwise,
[get_stylesheet()](https://developer.wordpress.org/reference/functions/get_stylesheet/)
is the same as [get_template()](https://developer.wordpress.org/reference/functions/get_template/).

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

 string Stylesheet

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

    ```php
    public function get_stylesheet() {
    	return $this->stylesheet;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-theme.php#L1136)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-theme.php#L1136-L1138)

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

| Used by | Description | 
| [wp_get_theme_preview_path()](https://developer.wordpress.org/reference/functions/wp_get_theme_preview_path/)`wp-includes/theme-previews.php` |

Filters the blog option to return the path for the previewed theme.

  | 
| [WP_Theme::markup_header()](https://developer.wordpress.org/reference/classes/wp_theme/markup_header/)`wp-includes/class-wp-theme.php` |

Marks up a theme header.

  | 
| [WP_Theme::is_allowed()](https://developer.wordpress.org/reference/classes/wp_theme/is_allowed/)`wp-includes/class-wp-theme.php` |

Determines whether the theme is allowed (multisite only).

  | 
| [WP_Theme::__get()](https://developer.wordpress.org/reference/classes/wp_theme/__get/)`wp-includes/class-wp-theme.php` |

__get() magic method for properties formerly returned by [current_theme_info()](https://developer.wordpress.org/reference/functions/current_theme_info/)

  | 
| [WP_Theme::offsetGet()](https://developer.wordpress.org/reference/classes/wp_theme/offsetget/)`wp-includes/class-wp-theme.php` |

Method to implement ArrayAccess for keys formerly returned by [get_themes()](https://developer.wordpress.org/reference/functions/get_themes/) .

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_theme/get_stylesheet/?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%2Fblue-sea-697d.quartiers047.workers.dev%3A443%2Fhttps%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_theme%2Fget_stylesheet%2F)
before being able to contribute a note or feedback.