751 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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
  • Has been part of the Envato Community for over 6 years
  • Has collected 1+ items on Envato Market
CreativeBoy says

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

164 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
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
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+6 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
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
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