bmondala
Member
Posted 4 years ago #
Hello WP-community,
I have an image set in the header my code (header.php) such as the following:
<div id="header">
<h1><img src="wp-content/themes/default/images/my_logo.png" alt="my logo" /></h1>
</div>
Now, the image only displays when i'm at index.php. when I click on other pages the header ceases to display my image. Weird?
header.php is a template file. But it won't display my image consistently. I could do it in CSS but I want the region to be clickable. Suggestions?
thanks guys!!
byron
mediakik
Member
Posted 4 years ago #
Hmm I wish I could help too, I've had problems having images show up in the index.php...notably .PNG images. The only workaround I found was to load the image as a background through css....
Which obviously won't work for you, and is a bit of nuisance for me...anyone else got suggestions around this?
bmondala
Member
Posted 4 years ago #
heh! i've found the culprit. should have known!
Just put a / in front of absolute address.
It's needed if other pages are to access that image. Because the pages are not located on the same hierarchy as index.php.