Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 ?

Thanks.

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

2 Answers 2

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

 
discard

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.