Title: Featured post &#8211; Calling thumbnails
Last modified: August 19, 2016

---

# Featured post – Calling thumbnails

 *  [samlester](https://wordpress.org/support/users/samlester/)
 * (@samlester)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/featured-post-calling-thumbnails/)
 * Hi,
 * I am currently creating a portfolio site using WordPress as the CMS I have created
   a query for my featured post so I can display a few thumbnails:
 *     ```
       $featured = new WP_Query('category_name=featured&showposts=6');
   
       while ($featured->have_posts()):
       $featured->the_post();
       ```
   
 * I then need to call the thumbnails but I have been having trouble with the next
   bit of php:
 *     ```
       for ($p=; $p<=24; $i++) {
       $featured = get_post_meta($p, 'thumbnail_1', true);
       $link = bloginfo('url')."?p=".$p;
       }
       echo "<a href='".$link."'><img src='".$featured."' class='thumbnail' alt='thumbnail'/></a>";
       ```
   
 * Help!
 * Thanks,
    Sam

Viewing 1 replies (of 1 total)

 *  Thread Starter [samlester](https://wordpress.org/support/users/samlester/)
 * (@samlester)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/featured-post-calling-thumbnails/#post-985619)
 * Any ideas?

Viewing 1 replies (of 1 total)

The topic ‘Featured post – Calling thumbnails’ is closed to new replies.

## Tags

 * [featured](https://wordpress.org/support/topic-tag/featured/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [thumbnails](https://wordpress.org/support/topic-tag/thumbnails/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [samlester](https://wordpress.org/support/users/samlester/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/featured-post-calling-thumbnails/#post-985619)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
