Query: SELECT p.id, p.post_title, u.user_nicename, p.post_date, p.post_type FROM wp_posts AS p, wp_users AS u WHERE p.post_author = u.ID AND (p.post_type = &#039;&#039;  OR p.post_type = &#039;post&#039; OR p.post_type = &#039;page&#039; OR p.post_type = &#039;attachment&#039;) ORDER BY p.post_date ASC LIMIT 50