WordPress.org

Forums

Images not linking correctly (7 posts)

  1. scrutiny17
    Member
    Posted 5 years ago #

    I can't seem to link to these 3 particular images from my website. I'm baffled as all the other images on my site link just fine from the same exact folder. This is the code I'm using and a link to me website.

    Thanks in advanced for any help.

    <div>
    <td><img src="images/homebt.png" border="5"></td>
    <td><img src="images/portbt.png" border="5"></td>
    <td><img src="images/aboutbt.png" border="5"></td>
    </div>

    http://www.scrutinizethis.net/

  2. scrutiny17
    Member
    Posted 5 years ago #

    I just tested it again by linking one of the img's to my background image. That also doesn't work in the <img src> but the background still displays itself o_O ???

  3. ClaytonJames
    Member
    Posted 5 years ago #

    Test this and see if it retrieves the image. I'm not 100% sure, but I think that will point it to the images folder in your current theme.

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

  4. scrutiny17
    Member
    Posted 5 years ago #

    I copy and pasted the code exactly as you put and it didn't work but i decided to add "<img " and ">" before and after it and it worked.

    So the full code is

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

    Thanks SO MUCH for the help Clayton. This was giving me issues for a good 2 hours T_T

  5. ClaytonJames
    Member
    Posted 5 years ago #

    Excellent! Sorry about that... I guess I assumed that you would probably go ahead and complete the code once you saw the missing piece. I'm glad it worked!

  6. scrutiny17
    Member
    Posted 5 years ago #

    haha yah after I tried it once I realized that you only put the important parts in

  7. ClaytonJames
    Member
    Posted 5 years ago #

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic