Title: get recent post
Last modified: August 19, 2016

---

# get recent post

 *  [chilibird](https://wordpress.org/support/users/chilibird/)
 * (@chilibird)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/get-recent-post/)
 * Hi,
 * I would like to have an excerpt of my recent post listed in the sidebar widget“
   recent post” Currently it list the title only
 * Can anyone help?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/get-recent-post/#post-1445657)
 * [http://codex.wordpress.org/Function_Reference/wp_get_recent_posts](http://codex.wordpress.org/Function_Reference/wp_get_recent_posts)
 *  Thread Starter [chilibird](https://wordpress.org/support/users/chilibird/)
 * (@chilibird)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/get-recent-post/#post-1445739)
 * thanks emsi, but I want to show excerpts, not just the listed item. is that possible?
   I found a plugin “recent-post with excerpt” that I am going to try.
 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/get-recent-post/#post-1445747)
 * Put this in a [PHP Code Widget](http://wordpress.org/extend/plugins/php-code-widget/):
 *     ```
       <?php
       $args=array(
         'post_type' => 'post',
         'post_status' => 'publish',
         'posts_per_page' => 10,
         'caller_get_posts'=> 1
       );
       $my_query = null;
       $my_query = new WP_Query($args);
       if( $my_query->have_posts() ) {
         while ($my_query->have_posts()) : $my_query->the_post(); ?>
           <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
           <?php
           the_excerpt();
         endwhile;
       }
       wp_reset_query();  // Restore global post data stomped by the_post().
       ?>
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘get recent post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [MichaelH](https://wordpress.org/support/users/michaelh/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/get-recent-post/#post-1445747)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
