WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which is best way to find URI in child Theme.

<?php echo get_template_directory_uri(); ?>
<?php bloginfo('template_directory'); ?>

Below given code works but it has "stylesheet" in it, sounds like its a hake to find URI. Is this the only solution ?

<?php echo get_stylesheet_directory_uri(); ?>
<?php bloginfo('stylesheet_directory'); ?>
share|improve this question
up vote 1 down vote accepted

Yes, stylesheet is for child themes, template for parent themes. Andrew Nacin has explained that recently on wp-hackers:

child themes were originally just style.css and functions.php. That's why "template" refers to the parent theme and "stylesheet" refers to the child theme.

share|improve this answer

Your Answer


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.