Viewing 4 replies - 1 through 4 (of 4 total)
  • No image is specified: <img alt="Latest Blog Post" src="" style="outline: 1px solid rgb(255, 0, 0);">
    src=”” should have an image URL (src=”https://www.adriaalsina.com/path/to/image/image.jpg&#8221;)

    This is the HTML that is being output:

    <!-- begin latest post -->
    <div id="latest">
    	<div class="l">
    	<h3>Latest Blog Post</h3>
    	<img src="" alt="Latest Blog Post" />
    	</div>

    Did you forget to upload an image for this post?

    Thread Starter Adriabarcelona

    (@adriabarcelona)

    The code line reads <img src=”” alt=”Latest Blog Post”>, which clearly indicates there’s no image, but I can’t edit the body of the template, what shall I do?

    Thanks!

    Thread Starter Adriabarcelona

    (@adriabarcelona)

    Sorry, I’ve found how to edit the code now, but still can’t see the bug, could anyone take a look at it? Thanks!

    <!-- begin latest post -->
    <div id="latest">
    	<div class="l">
    	<h3>En portada</h3>
    	<img src="<?php dp_attachment_image(0, 'full', '290', '180'); ?>" alt="En portada" />
    	</div>
    	<div class="post">
    	<h2><a>"><?php the_title(); ?></a></h2>
    	<div class="noimage"><?php the_content('? Read More'); ?></div>
    	</div>
    <div class="break"></div>
    </div>
    <!-- end latest post -->

    [please mark the code using backticks or the ‘code’ button]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem displaying latest image on post’ is closed to new replies.