WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] get latest post from a single category display linking thumbnail

[Resolved] get latest post from a single category display linking thumbnail

  • Hi all
    I have been using the code below to display the featured image of the latest post from the specified category. But it has stopped working, any ideas or better code?
    Site is here the white box next to the slider is where the thumbnail used to appear.

    <?php
    query_posts('cat=75');
    if ( has_post_thumbnail()) {
      echo '<a href="' . get_permalink() . '" >' . the_post_thumbnail() .'</a>';
    }
    ?>

    Many thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] get latest post from a single category display linking thumbnail’ is closed to new replies.
Skip to toolbar