• I am trying to add some static images to my index.php. I am new to php so any help would be appreciated! my code is pasted below:

    <img height=”91″ width=”108″ alt=”Ronal McDonald” src=”images/foodbank.jpg”/>

    Thanks a lot!

Viewing 6 replies - 1 through 6 (of 6 total)
  • WordPress isn’t good with relative urls, so try:

    <img height="91" width="108" alt="Ronal McDonald" src="https://your_domain/path_to/images/foodbank.jpg"/>

    instead.

    If it’s the theme folder, then build the src path using the bloginfo function…..

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

    If it’s in the theme folder of course…

    Thread Starter efan8224

    (@efan8224)

    the images are located within the theme folder in the images folder. so does that changed the src code t31os_?

    Thread Starter efan8224

    (@efan8224)

    the code doesn’t seem to be working

    so does that changed the src code

    No. Use t31os_’s example. If it doesn’t work, then you’re calling a non-existent image one way or another.

    Thread Starter efan8224

    (@efan8224)

    thanks I’ll play around with it!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP and HTML (image calling)’ is closed to new replies.