$current_theme = wp_get_theme(); echo $current_theme->name;In this example, we use the wp_get_theme() function to retrieve the current theme's data and assign it to the $current_theme variable. We can then use the theme's name property to display the theme name on the webpage. The PHP theme get function is part of WordPress's core library and can be found in the wp-includes/theme.php file. It is not a package library that needs to be installed separately.