Posted By

ninacess on 02/01/12


mysql wordpress

Versions (?)

Wordpress Display Recent Authors of Posts

 / Published in: MySQL

Select wpusers and wpposts to retrieve data from both tables in order to display post title, post date, author name with gravatar (gravatar isn't listed in this code) Note: probably not idea solution, but it's one of many fixes

  1. SELECT * FROM wp_users, wp_posts WHERE wp_users.ID = wp_postts.post_author AND wp_posts.post_type = 'post' AND wp_posts.post_status = 'publish' ORDER BY wp_posts.post_date DESC LIMIT 10

Report this snippet  

You need to login to post a comment.