Support » Fixing WordPress » Images not showing up from images file

  • Resolved Ichabod2


    I set up a new template for the static front page of my site and named home_page.php. I then added a new div within “main” and above “container” to take 4 (160 x 90) which I want to float next to each other to create a bar of thumbnails as a decorative graphic. The bar shows up but not the images. I can tell there three is space alloted for the images because when I refresh the page the outline for the images briefly shows up.
    Instead if using the WP facility to upload the images, I just created an images folder and ftp’ed it to my child theme folder which also contains the template. Here is the code for the div:

    <div id="thumb_bar">
    	<ul id="thumbs_list">
    <li><img src="images/books_thumb.png" width="160" height="90" /></li>
    <li><img src="images/glasses_book_gavel.png" width="160" height="90" /></li>
    <li><img src="images/court_house_top.png" width="160" height="90" /></li>
    <li><img src="images/meeting.png" width="160" height="90" /></li>

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]

    Another strange thing is that in Firebug the
    li’s are grayed out and the width and height attributes appear before the src attribute.
    Does anyone have ideas about what is happening here? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • wpismypuppet


    First: If you are going to show code here on the forum, wrap the code using the “code” tag. This will prevent the page from breaking like it’s doing 🙂

    Now to your question… can you provide a link so we can use firebug ourselves to better help you? And for now, try changing your url from:

    <img src="images/books_thumb.png" width="160" height="90" />


    <img src="<?php echo get_template_directory_uri(); ?>images/books_thumb.png" width="160" height="90" />

    Thank you wpismypuppet.
    Your solution did not work. It broke the page below where the images were suppose to go. I also tried <?php echo get_stylesheet_directory_uri(); ?>. However, you got me pointed in the right direction. I finally figured out (trial and error) that path needed a forward slash in front of everything for the root folder. Apparently, <?php echo get_template_directory_uri(); ?> doesn’t return the forward slash.
    At any rate, the problems is solved, and you will notice that I am using code tags above.
    Again, thank you. It is great that you are willing to share your knowledge—and time. Your avatar makes me think of halloween.



    You are welcome… glad I could at least point you in the right direction 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images not showing up from images file’ is closed to new replies.