I am trying to display my wordpress blog posts in another area of my website that is not wordpress. So I am just connecting to the database directly.
I have done the below query:
$query_rs_cwes_wp = "SELECT post_title FROM wp_posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date DESC";
Which works, but I need to only show posts in category id 4 which has a name of "blogs".
I can't see a column in the "wp_posts" table that links to the category name or id. Can you please help?