I am trying to search through post meta for keyword matches but I'm new to MySQL and I don't know how to write my query. I can write a basic query for
post_title matches but I don't know how to properly jump across tables.
In pseudo code, my query would be
"SELECT post_id FROM $wpdb->postmeta WHERE meta_key LIKE '%$query%' AND post_type = 'project'"
My problem is that the
post_type is only available in the
posts table and I don't know how to make the connection between
posts to check if the
ID is in fact the correct post type.