• I’ve been struggling with this problem for about a week now, and figured it might be time to put it to the forum. I built a custom theme in CSS/HTML, and am currently trying to convert it to PHP via Bitnami. All of the images I have coded into HTML, however, don’t work in PHP. I would just convert all of my images to CSS, but my main image is an image map, and I need it to be coded in HTML to work. Is there some trick to switching HTML code for images when converting to PHP? If it helps, this is the code I’ve been working with:

    <div id=”tape”>
    <img src=”images/tape.png” usemap=”#about” border=0>
    <map name=”about”>
    <area shape=”rect” coords=”175, 25, 250, 65″ alt=”about” href=”http://sarahmichellecollins.com/about”&gt;
    <area shape=”rect” coords=”270, 25, 345, 65″ alt=”writing” href=”http://sarahmichellecollins.com/writing”&gt;
    <area shape=”rect” coords=”355, 25, 415, 65″ alt=”blog” href=”http://sarahmichellecollins.com/blog”&gt;
    </map>
    </div>

    Anyone that can help me would be a lifesaver.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi badscenemyfault,

    Preface all of your “images/name.png”‘s with <?php bloginfo('template_directory'); ?>, so for example:

    src="<?php bloginfo('template_directory'); ?>/images/name.png"

    The reason that it’s not working is because it’s not looking in the theme folder for your images, it’s looking at the root of the website. We need it to be looking at /images inside of the active theme. Make sense?

    Best,
    Connor

    Thread Starter badscenemyfault

    (@badscenemyfault)

    Thank you so much! It worked like a charm!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Converting HTML with images to PHP’ is closed to new replies.