• With either classic or default themes, all images are stripped from category and archive link displays. This problem is so serious we will have to roll back to 1.2 unless someone has a fix. Again that change from <?php the_excerpt() ?> to <?php the_content(‘<p class=”serif”>Read the rest of this page »’); ?> does not, I repeat, does not stop the stripping of images. We are running our blog with archives and categories removed and with our entire history of postings loading! Otherwise significant content is simply thrown away.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I tried it myself just now. The change works in my case. Make sure you made the modification on the correct file.

    Thread Starter funlitmus

    (@funlitmus)

    What is the correct file? I made the change to archive .php in the default theme, which wouldn’t fix the category stripping problem. I see the full posting for both archives and categories but the images all appear as the alt text.

    You see the alt text, instead? Probably the browser you use disables image loading(?)

    Thread Starter funlitmus

    (@funlitmus)

    For only archives and categories? I don’t think so. I see the images on the initial load or or whenever I click on the blog title. I was doing a little debugging and put an echo bebug statement into the function that gets the image. My debug echo appears during initial loading but does not appear during category or archive listing. Why isn’t the display function called?

    What’s the function that gets the image??

    When you look at the source code, what do you have?
    You said you see the alt text; the <img src= ""> is probably there but couldn’t find the actual image. If you use relative referencing (e.g images/img1.jpg), change to absolute one instead (e.g. /blog/images/img1.jpg OR https://mydomain/blog/images/img1.jpg).

    Thread Starter funlitmus

    (@funlitmus)

    The code I put the echo into is links.php in the wp-includes folder. The img code is around line 210. The images appear just fine in the initial load. They just don’t appear with a category or archive selection. We use an images folder at the wordpress main folder. All references are relative. Thanks for the suggestion. I just changed one reference to absolute and it now loads for archive and category. I guesss there is code at another directory level that breaks the relative links. That’s a big relief. Thanks again. I hope this solves our problems because we really like the clean customization interfaces provided by the theme.

    I’m having the same issue with an image not showing up. Slightly different though.

    The image I have in my post shows up on both my live and test blogs on index.php. When I click the <!–more> link to get the full entry the same image does not show up on the single page on my live blog, but it does show up on the same page in my test blog.

    The image is obviously there, otherwise it wouldn’t be showing up on the index page.

    Here’s my blog: https://familywebwatch.com/blog/

    It’s the second post entitled “Get your free annual credit report”

    Any ideas as to what might be happening?

    bump

    oh yes, the image is there, but you need to check your code.
    this your image path: (that index uses)
    https://familywebwatch.com/blog/wp-images/fingerprint.jpg

    this is where it’s pointing in your archive:
    https://www.familywebwatch.com/blog/2005/03/04/get-your-free-annual-credit-report/wp-images/fingerprint.jpg

    jpettit,

    hmmm, that got me to thinking. In other posts, I spelled out the entire path to the image. When I checked this specific post I only put in the “wp-images/fingerprint.jpg” path. Once I switched it to the full path, the image showed up on the single page.

    Thanks jpettit! It’s amazing what a second set of eyes can help you find. ??

    I’m having the problem listed above from funlitmus. This issue is that I’m very new to coding so I have no idea what the echo statement is and where he put it to fix this bug? Can anyone help me?

    Tony, you probably have the relative/absolute link problem as well, like the example davincim gives above.

    If your main site is at https://www.example.com and the image you’re displaying is at https://www.example.com/wp-images/test.jpg

    You may be referencing the image in your post as: <img src= “wp-images/test.jpg” \> which works fine on the main page.

    But if you’re on an archive page, it’s looking for the image in https://www.example.com/archive/08/01/2005/wp-images/test.jpg (and that doesn’t exist)

    You should be referencing it as /wp-images/test.jpg (the leading slash makes it look back starting at the root of the site.. So no matter where you are, it’ll start at the base of https://www.example.com and look for the wp-images folder from there.)

    or even use the full absolute link of https://www.example.com/wp-images/test.jpg

    Is there no Mass Edit or fix for this? Cause that means every post Ive made has to be edited….

    Please tell me theres a quick way or another option…

    UPDATE:

    It’s an issue with the theme. If you edit the archive.php template, you’ll find it uses the_excerpt() to display post content, which filters out html tags. So to get what you’re after, you need to change:

    <?php the_excerpt(); ?>

    to

    <?php the_content(); ?>

    ENJOY!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Problem with images not showing’ is closed to new replies.