• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Draft / WordPress Theme Path and URI

WordPress Theme Path and URI

Last updated on July 17, 2018 by Sal Ferrarello

WordPress comes with some helper functions for finding a theme’s path and/or URI, which are tremendously useful but I always have to look them up. Therefore, I’m making note of them here so I know where to look them up.

Note: All of these functions return a string that does NOT include a closing slash (/)

Child Theme Path

get_stylesheet_directory()

get_stylesheet_directory()
/app/public/wp-content/themes/mychildtheme

Child Theme URI

get_stylesheet_directory_uri()

get_stylesheet_directory_uri()
https://example.com/wp-content/themes/mychildtheme

Parent Theme Path

get_template_directory()

get_template_directory()
/app/public/wp-content/themes/parent

Parent Theme Path

get_template_directory_uri()

get_template_directory_uri()
https://example.com/wp-content/themes/parent
Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit
Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: WordPress, WordPress Theme

Reader Interactions

Leave a Reply Cancel reply

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

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in