is_child_theme(): bool

Whether a child theme is in use.

Return

bool True if a child theme is in use, false otherwise.

Source

function is_child_theme() {
	return get_template_directory() !== get_stylesheet_directory();
}

Changelog

VersionDescription
3.0.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.