Whether a child theme is in use.
Source
function is_child_theme() {
return get_template_directory() !== get_stylesheet_directory();
}
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
Whether a child theme is in use.
function is_child_theme() {
return get_template_directory() !== get_stylesheet_directory();
}
Version | Description |
---|---|
3.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
WARNING: This function uses the
TEMPLATEPATH
andSTYLESHEETPATH
constants internally. If calling from a plugin, such as during plugin activation, there’s a chance these will be undefined. It is better to use: