[wp-testers] template_directory ? childtheme_directory ?

John Asbacher john.asbacher at gmail.com
Fri Jan 8 22:28:29 UTC 2010


WP 2.9.1

Using template_directory does not allow finding the file in the child theme directory at all.

all examples assume active childtheme in CHILDTHEME directory

This was reported over a year ago as well.
http://lists.automattic.com/pipermail/wp-testers/2008-October/009433.html

*incorrect* ?
this line
<img src="<? bloginfo('template_directory'); ?>/images/header.jpg" />
returns
ww.SITE.com/wp-content/themes/k2/images/header.jpg

workaround / correct using *stylesheet_directory*
this line
<img src="<? bloginfo('stylesheet_directory'); ?>/images/header.jpg" />
returns
ww.SITE.com/wp-content/themes/CHILDTHEME/images/header.jpg

what I would expect is...

<img src="<? bloginfo('theme_directory'); ?>/images/header.jpg" />
returns
ww.SITE.com/wp-content/themes/CHILDTHEME/images/header.jpg
if not found
ww.SITE.com/wp-content/themes/k2/images/header.jpg

-- 

------------------------------------------------------------------------
*John Asbacher* Inform Productions v 604 734-3447
Video & Multi-Media Productions *c 604 721-7994*
3773 Yukon St. Vancouver, B.C. V5Y 3S3 Canada
*john at shootedit.com* --- http://www.shootedit.com


More information about the wp-testers mailing list