WP_Theme::get_stylesheet() WordPress Method

The WP_Theme::get_stylesheet() method is used to get the stylesheet name for a given theme. This is useful for making sure that the correct stylesheet is loaded for a given theme.

WP_Theme::get_stylesheet() #

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


Description

In the case of a child theme, this is directory name of the child theme. Otherwise, get_stylesheet() is the same as get_template().


Top ↑

Return

(string) Stylesheet


Top ↑

Source

File: wp-includes/class-wp-theme.php

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


Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.