Answer the question
In order to leave comments, you need to log in
What is the difference between get_template_directory_uri() and get_template_directory?
Tell me, in simple and understandable words, what is the difference between these two functions, preferably with examples?
As I understand it:
1) get_template_directory - this function returns the path from the root to the theme
2) get_template_directory_uri() - returns the URL of the parent theme (read on wp-kama, but what is the parent theme?). You can also temporarily connect pictures with this function.
Answer the question
In order to leave comments, you need to log in
get_template_directory() - returns the path in the file system, for example:
/home/admin/web/habr.com/public_html/wp-content/themes/theme
http://habr.com/wp-content/themes/theme
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question