Forums

Problem displaying latest image on post (5 posts)

  1. Adriabarcelona
    Member
    Posted 1 year ago #

    Hi, I've installed the "transparency" theme on my blog but it doesn't display the latest picture, do you know where the problem could be?
    The site is http://www.adriaalsina.com/

    Thank you very much!

  2. geezerd
    Member
    Posted 1 year ago #

    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="http://www.adriaalsina.com/path/to/image/image.jpg")

  3. geezerd
    Member
    Posted 1 year ago #

    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?

  4. Adriabarcelona
    Member
    Posted 1 year ago #

    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!

  5. Adriabarcelona
    Member
    Posted 1 year ago #

    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]

Topic Closed

This topic has been closed to new replies.

About this Topic