Dynotaku
Member
Posted 2 years ago #
Okay, what could cause this? 2 images in a directory. The php file calls them both with "image/pic1.jpg" and "image/pic2.jpg" One picture displays one one doesn't. If I change the url on the one that doesn't display to the full url with http:// and all that, it shows up, so I know it's there.
What on earth is going on with that? Do I have a crappy host or something? Do I need to use the full URL all the time just in case?
This is so frustrating. I've spent over 2 hours just trying to get my title bar to work. Should have taken me 2 minutes.
nemci7v
Member
Posted 2 years ago #
The image HTML should look like this
<img src="wp-content/themes/your_theme/images/your_image.png" alt="..." />
Check if that's right, otherwise paste the code you're using so we can understand what's going on.
Dynotaku
Member
Posted 2 years ago #
Wow that's weird. I got it to work if I put the wp-content/themes/your_theme/images/pic.jpg in. But that's only for img src links apparently, because background images that use the css background property work with just /images/pic.jpg
Is that documented anywhere? Is that a quirk of wordpress or do I have a messed up installation? It's really irritating that I've spent so long on this.
nemci7v
Member
Posted 2 years ago #
Are you calling two background images from 1 div? If so, that won't work. You're probably doing a CSS mistake.
from within php files I normally do (assuming images are in images folder in my theme):
<img src="<?php bloginfo('template_url'); ?>/images/image.png" alt="stuff" />
which parses as the full url within the browser when loaded
nemci7v
Member
Posted 2 years ago #
Thanks Rvoodoo! I didn't think of that