Filtering posts after category and a meta value
-
Hello,
currently I have a little problem with filtering my posts in a widget. I need to filter my posts after a category id and a meta_key. The thingy with the meta_value wasn’t the problem but how can I select the categories then?
The following SQL query is the current status:
SELECT post.*, meta.meta_value AS release_date FROM $wpdb->posts post INNER JOIN $wpdb->postmeta meta ON post.id = meta.post_id AND meta.meta_key = 'date'
Maybe one of you can give me a last tip ??
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Filtering posts after category and a meta value’ is closed to new replies.