Title: Date in latest posts php code
Last modified: August 19, 2016

---

# Date in latest posts php code

 *  [mikekellner](https://wordpress.org/support/users/mikekellner/)
 * (@mikekellner)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/date-in-latest-posts-php-code/)
 * Hi,
 * I found the following code to display the latest posts as a PHP side bar widget:
 * `<?php get_archives('postbypost', '10', 'custom', '<li>', '</li>'); ?>`
 * which is great for displaying:
 * latest post title
    slightly older post title
 * How would I add the post date before this like:
 * 20 Aug – Latest post title
    18 Aug – slighty older post title
 * Thanks in advance,
    Mike

The topic ‘Date in latest posts php code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [mikekellner](https://wordpress.org/support/users/mikekellner/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/date-in-latest-posts-php-code/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
