WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?


share|improve this question
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 '11 at 19:20

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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