Title: Recent posts
Last modified: August 24, 2016

---

# Recent posts

 *  [dennis2806](https://wordpress.org/support/users/dennis2806/)
 * (@dennis2806)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/recent-posts-20/)
 * I would like to add three recent posts on my homepage.
    Now I have a piece of
   code. I just want the code for the **featured image **. we can help me?
 *     ```
       <ul>
       <?php
       	$args = array( 'numberposts' => '3' );
       	$recent_posts = wp_get_recent_posts( $args );
       	foreach( $recent_posts as $recent ){
       		echo '
       <li><a>' .   $recent["post_title"].'</a> </li>
        ';
       	}
       ?>
       </ul>
       ```
   

Viewing 1 replies (of 1 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/recent-posts-20/#post-6130314)
 * review
    [https://codex.wordpress.org/Function_Reference/get_the_post_thumbnail](https://codex.wordpress.org/Function_Reference/get_the_post_thumbnail)
 * try
 * `get_the_post_thumbnail( $recent["ID"] );`

Viewing 1 replies (of 1 total)

The topic ‘Recent posts’ is closed to new replies.

## Tags

 * [last](https://wordpress.org/support/topic-tag/last/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [recent](https://wordpress.org/support/topic-tag/recent/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/recent-posts-20/#post-6130314)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
