Title: Recent post from users
Last modified: August 19, 2016

---

# Recent post from users

 *  [muttmagandi](https://wordpress.org/support/users/muttmagandi/)
 * (@muttmagandi)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/recent-post-from-users/)
 * Hi guys!
 * I’ve got a requst from my client, “Can we show the 4 most recent post from any
   user?” – That was easy. Done and done.
 * Next day my client comes back to me and would like to make a minor fix:
 * 4 lastest post from users. A user can only appear once( only one post from a 
   user, but still 4 most recent).
 * I’ve been struggling with this a while no so i hope you can help me.
    Using a
   plugin, sorta looks like this `$user = get_userdata(15);`
 * I’m requesting the id’s( get_userdata(**15**) ) with a simple mysql_query()
 * `SELECT post_author, post_date FROM $wpdb->posts ORDER BY post_date DESC LIMIT
   4`
 * When im trying to select 4 unique users I use this query, but cant get it to 
   work.
 * `SELECT DISTINCT post_author, post_date FROM $wpdb->posts ORDER BY post_date 
   LIMIT 4`
 * Any good ideas to solve this?
 * cheers

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/recent-post-from-users/#post-1846644)
 * Will it work to take post_date out of the SELECT but still order by post_date?
   I think that way you will get the 4 authors who have posted most recently.

Viewing 1 replies (of 1 total)

The topic ‘Recent post from users’ is closed to new replies.

## Tags

 * ["recent post"](https://wordpress.org/support/topic-tag/recent-post/)
 * [MySQL Query](https://wordpress.org/support/topic-tag/mysql-query/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/recent-post-from-users/#post-1846644)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
