bloginfo(‘stylesheet_directory’) vs. get_stylesheet_directory_uri() and include(‘file.php’) vs. get_template_part()

get_stylesheet_directory_uri() returns a value, it doesn’t print anything. So you have to use:

echo get_stylesheet_directory_uri();

get_template_part() is just a wrapper for locate_template(). But the latter has one advantage: It returns the path of the file it has found. Try the following:

$path = locate_template( 'sidebar-front.php', TRUE );
echo $path;

Leave a Comment