• In my theme I put <img src=”/wp-content/themes/my-theme/images/whatever.jpg”>

    Is it possible to setup something like <img src=”<?php TEMPLATEPATH ?>/images/whatever.jpg”>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Example of what I use, is this:
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/title-icon.png" alt=""/>

    I hope this helps. =)

    spencerp

    bloginfo(‘stylesheet_directory’) doesn’t work for me, but get_stylesheet_directory() does – at least it gives me the absolute path to the current theme directory. TEMPLATEPATH provides a relative (to http://) path as well.

    ———————
    Development

    (i do this way:
    <img src=”<?php echo(TEMPLATEPATH)?>/images/banner1.jpg” />
    regards)
    NOP don’t work in Firefox.
    use spencerp solution.

    westbym

    (@westbym)

    Try this:

    <?php bloginfo('template_directory'); ?>

    example:

    <img src="<?php bloginfo('template_directory'); ?>/images/title-icon.png" alt=""/>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘TEMPLATEPATH images direcotry?’ is closed to new replies.