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() {
	global $wp_stylesheet_path, $wp_template_path;

	return $wp_stylesheet_path !== $wp_template_path;
}

Changuelog

Versionen Description
6.5.0 Maques use of global template variables.
3.0.0 Introduced.

User Contributed Notes

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