OK, this may be a dumb question. Is it possible, using PHP, to detect which theme has been set for use by Wordpress ? If so, how's it done ?


  • The bigger question here is why you would need this information. I have the suspicion that your need to get the current theme may be due to some other, possibly non-standard, approach that could probably be done a lot easier the "WordPress way". Care to elaborate?
    – Tom Auger
    Aug 30, 2011 at 19:20

2 Answers 2


If you only need the current theme name, you can use get_current_theme().


This snippet will get the current theme info for you.

$theme_data = wp_get_theme();
echo $theme_data->Name;

See wp_get_theme for more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.