751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

I am using starkers naked theme to build a site in wordpress on the latest version of wordpress. I am a little confused. I have the homepage looking correct. I copied and pasted the code into the single.php and the page.php but a lot of the images are not showing up. The layout is there, the alt text for the images are there, but a lot of the nav images didn’t show up. They show up fine on the homepage, so why wouldn’t they here? any ideas?

24 posts
  • Bought between 1 and 9 items
  • Has been a member for 5-6 years
CreativeBoy says

I can help, if you will show me your wordpress blog.

164 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 50 000 and 100 000 dollars
  • Won a Competition
tonyc says

Thats because you are probably loading the images with an img tag for example:

<img src="path to the image" alt="image" /> and that’s fine when you are in the root.

But when you navigate to a page your url is something like:

http://domain.com/post-title/

so your images path is no longer correct.

In order to fix this you should insert your images this way:

<img src="&lt;?php echo bloginfo('template_directory');?&gt;/images/image.gif" alt="" />

If the image resides in a subfolder of your theme’s folder called images.

Hope this explanation makes sense!

352 posts
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 50 and 99 users
  • Sold between 10 000 and 50 000 dollars
+1 more
danharper says

If you’re including images through HTML in your template, you must include:

<?php bloginfo(‘template_directory’#); ?>

at the beginning of image path. (remove the #)

Edit: Nevermind, see Tonyc’s post above.

751 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 1 and 9 users
  • United States
CyberShot says

thanks guys. I thought there might have been another way. I added the code to my images and they are working now.

by
by
by
by
by
by