In Wordpress I have created some categories. -> News, Gigs, etc.
I want to pull posts depending on their categories. For instance, I want to pull all category 2 posts as they are "News". The only problem is that my knowledge of MySQL is limited and joins are most probably going to be needed.
I can supply the database structure if needed.
Here is the table that ties the posts to the categories, wp_post2cat:
CODE
rel_id post_id category_id
1 1 1
2 3 2
4 4 3
1 1 1
2 3 2
4 4 3
Obviously the post_id relates to the post ID. I don't understand how to query for the latest 5 news posts that have a status of "publish".
Thanks to anyone who reads, helps, etc.