Title: recent-post Plugin
Last modified: August 18, 2016

---

# recent-post Plugin

 *  [gsoli](https://wordpress.org/support/users/gsoli/)
 * (@gsoli)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/recent-post-plugin/)
 * I’ve been looking for a plugin in WP that would allow me to display a post in
   the sidebar. More specifically, the most recent post of a particular category.
   I wanted to put the most recent post in the News category in my sidebar. So, 
   I wrote a plugin. Save the [recent-post](http://girasoli.org/~web/scripts/wp/recent-post.phps)
   plugin to your wordpress/wp-content/plugins directory, then change the .phps 
   extension to .php.
 * After activating your plugin, you can place the get_recent_post() function anywhere
   in your php templates. I placed it in my sidebar.php template, as:
 * `
    < ?php _e(get_recent_post(2)); ?> </>
 * “2” in this case is my News category which has a Category ID of 2. The output
   of the get_recent_post() function will look like the following:
 * `
    Title: Content

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

 *  [dylan](https://wordpress.org/support/users/dylan/)
 * (@dylan)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-post-plugin/#post-123025)
 * Is it possible to modify this plugin so that it would get the exerpt from the
   most recent post in a category? Or is there another way to do that…
 *  Thread Starter [gsoli](https://wordpress.org/support/users/gsoli/)
 * (@gsoli)
 * [21 years, 4 months ago](https://wordpress.org/support/topic/recent-post-plugin/#post-123030)
 * Dylan,
 * I think that is a great suggestion. I’ve modified the plugin to support excerpts.
   Please [check](http://girasoli.org/?p=26) out the syntax and download the plugin.

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

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

 * 2 replies
 * 2 participants
 * Last reply from: [gsoli](https://wordpress.org/support/users/gsoli/)
 * Last activity: [21 years, 4 months ago](https://wordpress.org/support/topic/recent-post-plugin/#post-123030)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
