WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Broken images on Index.php only (10 posts)

  1. pronetworkads
    Member
    Posted 5 years ago #

    I have an odd situation. Images are working everywhere in the site except for index.php. I assumed that it was an issue with edits I made to that file, but when I replaced my edited version with the original version the background image and other images weren't showing (background is assigned via style.css and is the same throughout - I also have a table bg image and form images that aren't showing). All of the pages and php files are pulling from style.css. The fonts and other items from style.css are working in index.php fine. I made some edits to verify and was able to see the changes, so it is reading the file fine. Why will it not read the background image from the style.css file or other images I placed on the page, but the other php files will? I verified that the images are all RGB (I don't know if that makes a difference in WP, but other image display issues I've found in the past with CMS's were solved by only using RGB)

    Any ideas?

  2. Chris_K
    Member
    Posted 5 years ago #

    Got a link?

  3. pronetworkads
    Member
    Posted 5 years ago #

  4. pronetworkads
    Member
    Posted 5 years ago #

    If you mouse over directly underneath the "comments" box and to the bottom right of the newsletter box you'll see where the missing images are... I'm at a loss.

  5. Chris_K
    Member
    Posted 5 years ago #

    In the source, you have this:

    <input name="signup" src="images/signup.jpg" type="image">

    Yet, there's no image at
    http://www.premierlimotampa.com/images/signup.jpg

    Where is that signup.jpg located?

  6. pronetworkads
    Member
    Posted 5 years ago #

    I added it to the same image folder as the rest of the theme files - wp-content/themes/monoblock/images/

    The header bg image is showing and it is in the same directory.

    I used the full path and was able to pull it up.

  7. haochi
    Member
    Posted 5 years ago #

    You can 1) move the signup.jpg to /images/ or, 2) change "/images/signup.jpg" in your index.php file to "http://www.premierlimotampa.com/wp-content/themes/monoblock/images/signup.jpg"

  8. Chris_K
    Member
    Posted 5 years ago #

    2.b) :-)

    "<?php bloginfo('stylesheet_directory'); ?>/images/signup.jpg"

  9. pronetworkads
    Member
    Posted 5 years ago #

    Thanks! That did it. Ok - there has to be a difference then in the index page and other pages in the way they use the paths/data. Is there or should I use the format you sent for all image paths? What confuses me is that the header image pulls up fine across the site, but the only place that images needed to be called differently was on the index page. I found a support page that deal with using the index page but didn't see any references to using links or paths.

  10. Chris_K
    Member
    Posted 5 years ago #

    The formats that haochi and I gave (2 and 2b respectively) both define absolute paths to the image so either should work on any page, any part of your site.

Topic Closed

This topic has been closed to new replies.

About this Topic