• Resolved arosen333

    (@arosen333)


    I am creating my own theme. I need to have an image referenced manually using the <img src=”… tag in the footer.php file I created. The pathway (image/myimg.gif…for instance) is recognized from the style.css file. I have a number of background images that do appear using the same pathway. Is there a way of referencing the image from the footer.php file manually. Since it will appear on every page, I don’t want to use the image upload button in WordPress for this.

    Thanks for your time,

    Andrea

Viewing 7 replies - 1 through 7 (of 7 total)
  • Where is the image file on your site?

    im sorry but your question is a bit confusing, can u try and explain it with some screenshot or images.. what is it taht your really tryin to do… will be glad to help you out.

    Where have you placed the image file on your site. What is its full url? What is your WordPress site’s url?

    Thread Starter arosen333

    (@arosen333)

    Sorry if it was confusing. I have created a theme. Inside that theme is an images directory. That is where all the images are. From my footer.php file, would like to be able to use the html code to reference an image:
    <img src=”images/ks.gif” width=”112″ height=”37″ border=”0″

    Thread Starter arosen333

    (@arosen333)

    At the moment, the url is only on my local machine, so the url is http://localhost:8080/wordpress/

    so let me get this right.. what your saying is you basically want to refrence that path so that it is easier for you to change it later on.. like u would change one instance of it and it would apply to all relevant paths.. is that what you want to do?

    well you can use the tag – <?php bloginfo(‘template_url’); ?>
    its a very widely used tag, what it does is it refrences your wordpress current theme directory.

    so ur example would become..
    <img src=”<?php bloginfo(‘template_url’); ?>/images/ks.gif” width=”112″ height=”37″ border=”0″>

    Thread Starter arosen333

    (@arosen333)

    works like a charm. Thanks so much. Have a wonderful day!

    Andrea

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Image directory’ is closed to new replies.