drtanz — 2009-10-16T10:08:29-04:00 — #1
Hi I made my xhtml template and now converting it to wordpress.
I have some images and flash files that I need to reference from within the html, but not sure whether I should be using the TEMPLATEPATH variable, or bloginfo('template_url'), or some other thing.
What is the difference between those two, do they have different uses? thanks
retronetro — 2009-10-16T12:44:17-04:00 — #2
drtanz — 2009-10-16T15:28:52-04:00 — #3
I had already read that, but I still cant see the difference between them
jonnya — 2009-10-19T15:12:57-04:00 — #4
To cut a long story short:
<?php bloginfo('template_directory'); ?>
will give you the path to the template directory (without a trailing slash)
So for example:
in a template will link to the file 'mycooljs.js' in the directory 'js' in your theme/template directory.
This I believe is the preferred method, I know this works perfectly!
drtanz — 2009-10-19T15:30:00-04:00 — #5