WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/get stylesheet

Description

Retrieve name of the current stylesheet.

The theme name that the administrator has currently set the front end theme as.

For all intents and purposes, the template name and the stylesheet name are going to be the same for most cases. In the event that you use a child theme, that is the name that will be returned, rather than the parent.

Usage

<?php get_stylesheet(); ?>

Parameters

None.

Return Values

(string) 
Stylesheet name.

Examples

Notes

  • Uses: apply_filters() Calls 'stylesheet' filter on stylesheet name.
  • Uses: get_option() to retrieve the 'stylesheet' option.
  • In the event a child theme is being used, that is the name that will be returned, not the parent theme name (use get_template_directory() instead if you want the parent directory)

Change Log

Since: 1.5.0

Source File

get_stylesheet() is located in wp-includes/theme.php.

Related

Theme paths: get_template(), get_template_directory(), get_template_directory_uri(), get_theme_roots(), get_theme_root(), get_theme_root_uri(), get_stylesheet(), get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo(), get_theme_file_uri(), get_theme_file_path()

See also index of Function Reference and index of Template Tags.