Get Path To Current Wordpress Theme
Posted:
Thursday, November 29th, 2012Last modified:
Friday, March 27th, 2015Topics:
WordPressOverview
How to get the path to the current the Wordpress theme.
Function get_template_directory_uri()
Get full URL with get_bloginfo()
Calling get_bloginfo() with the $show argument set to ''template_url'' returns the path as full URL.
Outputs:
http://example.com/wp-content/themes/my_theme
You can also use template_directory, but template_url seems more semantically correct. Originally template_directory displayed a relative path, which seems like a good idea, but they changed that for some reason.
References
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.