I'm trying to write a custom SQL query that will create a list of the most recent Posts AND comments and I'm having trouble visualizing how i can do this.
I can pull the latest comments by date DESC and i can pull the latest posts by date DESC but how do I make a feed / query to show them both?
Here is my comment SQL
SELECT comment_id, comment_content, comment_date
FROM wp_comments
WHERE comment_author = 'admin'
ORDER BY comment_date DESC
Edit: more clear:
Sorry, I should have been a little more clear. I want to have a list like this based on what date they occurred:
Wordpress post
wordpress post
wordpress comment
wordpress post
wordpress comment
So if someone comments on a 4 month old post, it will still show up at the top of this 'feed'