Jump to content

Recommended Posts

Posted

Hello everyone, I'm creating my first website to sharpen my skills at web design, however I have a little problem here. The logo I created only appears on the homepage and disappears when I visit another page. I assume my problem is what Web designers call "static image"? and what I need is to make it a "dynamic" one through PHP? if yes then how do I go about it? if no then what should I do to explain further?

Thanks in advance everyone :)

Posted

Can you post a link to your site?

 

I'm guessing that there is a path issue with your other pages - are they in the same folder as your homepage?

Posted (edited)

I'm assuming that you hard coded this image to the header file. If that is the case you will need to add a leading forward slash ( / ) to the image file path:

 

<img src="/wp-content/uploads/logo.jpg">

Edited by newseed
Posted

Hahahaha I literally spent over an hour trying to work this out before posting here. I must say that I felt completely defeated when I saw the red slash standing there in front of me, but I still bursted with big laughter. :lol:

Thank you guys for helping me out! :D

Posted

This won't be the last time you go through something like this. After doing this for 6 years I still find myself trying to fix a problem which ended up being just a single character that kept it from working. :)

Posted (edited)

I think what newseed has suggested with the / is a root-relative link which always goes back to the root directory from whatever level the link is on, so the link code will always go back to the root directory and then work down from there to find the file or folder.

 

I have found that this only works online, it's inconvenient to use because when you check a page on your computer the link goes back to the computer's root directory which is C:\ and it probably won't find the file in there. But as long as it works online, that's all that matters.

 

Tutorial:- http://www.motive.co.nz/glossary/linking.php#root

Edited by Wickham

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...