path_to_theme() goes to parent theme not subtheme I'm using zen as my parent theme and for some reason path_to_theme() is suddenly printing /sites/all/themes/zen instead of the subtheme /sites/all/themes/&lt;mytheme&gt;. What's even more confusing is that it's only happening when node/12 is being displayed.

Could this code have something to do with it?

&lt;?php
//template.php
if(isset($vars['node'])){
    if($vars['node']-&gt;nid == 12) {
        $vars['is_request_quote'] = true;
    }
}
?&gt;


I use the variable $is_request_quote to change the layout in page.tpl.php. I do this through &lt;?php elseif( $is_request_quote ) : ?&gt; -New layout here- &lt;?php endif; ?&gt;.  Could that be the one affecting it?
I had this problem too. Solution here, applied to node instead of page, worked for me: copy node.tpl.php to your custom theme templates directory. Once I did that, path_to_theme() behaved correctly.