Your images folder should be inside your theme’s folder.
Thanks for the reply esmi.
Yes, the images folder is inside of the theme folder, just as twentyten & twentyeleven are.
I have done a good amount of webdesign (though it’s been a while) so I understand most of the concepts. It should be a simple img src=”images/facebook.png” tag but for some reason it just refuses to show…
I would link to the example but I am working locally.
Is there some kind of link issue when a .php page is called from inside another .php page? My index.php loads the header.php which has the image links, but both .php files are in the same directory as the image folder.
You cannot use relative urls in markup within WordPress. Stick to absolute urls.
ahh okay… that sure did it… though now I have a new problem.
Now my code is
img src=”http://localhost/Joby WordPress/wp-content/themes/Origional stripped/images/twitter.png”
which will obviously break as soon as the site is uploaded…
How do I work around that?
Do I have to use the dashboard somehow to include images in my theme?
Thanks again for your help.
update- since then I searched for some “relative url” topics and seem to have found the people that were looking for the same solution I was looking for. And what do you know, esmi was there posting helpful information…
thanks for sending me in the right direction.
You need to use WP functions to replace urls such as the site url or the url for the template directory.
<img src="<?php echo get_stylesheet_directory_uri();?>/images/twitter.png alt="Twitter" />
I’d also suggest that you get that space out of your theme’s folder name. Use a hyphen instead.
Fantastic. This had me held up for far too long, and I never would have guessed the relative URL’s.
Also, I’m new to this php wizardry… can’t wait to become a little more adept.
Your advice worked like a charm, thanks again.