• Live site.
    work.php
    functions.php

    I’m trying to set up a portfolio page that will show a series of thumbnails on the /work/ page. However instead of thumbnails, I am seeing ” alt=”View more info” /> in their place. Any ideas what could be causing this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t see the problem you describe.

    probably fixed already.

    from the code, the reason was in these lines:

    <?php $image = get_the_post_thumbnail(); ?>
    
                    <a href="<?php the_permalink(); ?>"<img src="<?php echo $image; ?>" alt="View more info" /></a>

    and a missing > in the html a tag.

    get_the_post_thumbnail() returns the full image html – not just the image url

    a possible fix:

    <?php $image = get_the_post_thumbnail(); ?>
    
                    <a href="<?php the_permalink(); ?>" title="View more info"><?php echo $image; ?></a>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘seeing " " alt="View more info" /> " instead of thumbnails’ is closed to new replies.