'stylesheet_directory' vs 'template_directory'
-
get_bloginfo( 'stylesheet_directory' ) //vs get_bloginfo( 'template_directory' )I’m curious if about this. I’ve been using stylesheet_directory instead of template_directory to support child themes. But in a lot of examples on the codex oftentimes this isn’t the case. i.e.
function my_login_logo() { ?> <style type="text/css"> body.login div#login h1 a { background-image: url(<?php echo get_bloginfo( 'template_directory' ) ?>/images/site-login-logo.png); padding-bottom: 30px; } </style> <?php } add_action( 'login_enqueue_scripts', 'my_login_logo' );Source: Customizing the Login Form
My question: Is this just a housekeeping thing and there’s just too many examples to work through and optimize? Is there a significant point where using template_directory is preferred? Or finally, is there a performance difference that I’m overlooking between these?
The topic ‘'stylesheet_directory' vs 'template_directory'’ is closed to new replies.