• Whats the code in a theme file when you want to put link to an image that you are not defining in your style sheet – for instance an image map that is in the header – currently I’m having to put the full static link to the image but there has to be an easier way right?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter pylorns

    (@pylorns)

    Here is the code – you can see I’m having to push the link to those image files – i’d like to have this as the path to the theme folder…

    <div id="Header"></div>
    
    <!-- Static Image here -->
    <div id="subheader"><img src="https://www.wetwired.org/sandbox/wordpress/wp-content/themes/Wetwired WordPress Theme/images/topnav_menu.png" alt="" width="563" height="26" usemap="#Map" />
    <map name="Map" id="Map"><area shape="rect" coords="13,3,75,27" href="https://sandbox.wetwired.org/wordpress/" target="_self" alt="Wetwired Home" />
    <area shape="rect" coords="122,3,201,23" href="https://www.wetwired.org/about/" target="_self" alt="About Wetwired" />
    <area shape="rect" coords="268,5,396,25" href="https://www.wetwired.org/archivepage/" target="_self" alt="Wetwired Archives" />
    <area shape="rect" coords="439,6,548,23" href="https://www.wetwired.org/category/podcast/" target="_self" alt="Podcasts" />
    </map></div>
    
    <!-- End Header -->
    Thread Starter pylorns

    (@pylorns)

    Anyone?

    Have you try :
    <img src="<?php bloginfo('template_url'); ?>/images/image.jpg">

    See that
    I am french. Sorry for my bad english.

    ‘template_url’ – URL for template in use.
    ‘template_directory’ – URL for template’s directory.

    You should not put a space in your url.
    In web; you must replace space by underscore to name folder.

    or replace in url, space by %20

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static Images in theme’ is closed to new replies.