• Resolved tylerjay

    (@tylerjay)


    I’m a building my theme’s homepage. I have images/graphics within the php like this “<img src=”img/featuredcalendar.jpg” width=”280″ height=”33″ />”
    however they won’t display. Background images are loading fine.

    Is there a reason for this? Is the only way around to use background images?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You need to call the images using: <img src=”<?php bloginfo(stylesheet_directory); ?>/img/featuredcalendar.jpg” width=”280″ height=”33″ /> –

    probably because your img src is in a “relative path” format, meaning it is looking for images in the img folder, relative to the path you are currently browsing.

    Try doing this:

    <img src="<?php echo bloginfo('stylesheet_directory'); ?>/img/featuredcalendar.jpg" width="280" height="33" />
    Thread Starter tylerjay

    (@tylerjay)

    That did it. Thank you sir!

    good tip, have to remember this

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Noob Q : Why wont wordpress php files display images?’ is closed to new replies.