WordPress.org

Ready to get started?Download WordPress

Forums

TEMPLATEPATH question ... (3 posts)

  1. thornomad
    Member
    Posted 8 years ago #

    Hi,

    I wanted to move the images that my templates reference (not in the CSS file, but in the template files) to the "images" folder in the theme so when I make global upgrades, I can just upload a single package. I make changes on my local machine which is running a mirror of the blog that is online.

    Currently, all my image references point to http:// sources not on my local machine. What I wanted to do was use the TEMPLATEPATH function so that while I was on my local machine, it would find the pictures, and when I uploaded my new theme version, it would also find the pictures.

    However, I don't think I am using TEMPLATEPATH correctly. How do I point a <img src= to my theme directories images folder ?

    Thanks.

    Damon

  2. moshu
    Member
    Posted 8 years ago #

    In template files I use this:
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/mypic.jpg" width="100" height="200" />

  3. thornomad
    Member
    Posted 8 years ago #

    Thanks - I will give that ringer a try.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.