Wodpress: how to get current theme from the code

If for some reasons you need to get current WordPress theme, here is a simple way to get it:

<?php
    require(dirname(__FILE__) . '/wp-load.php');
    $theme_name = get_current_theme();
    echo $theme_name;
?>

Ref.



Leave a Reply

Your email address will not be published. Required fields are marked *