Created
June 20, 2014 14:12
-
-
Save azeemhassni/3293637cf145871c31b0 to your computer and use it in GitHub Desktop.
Wordpress Filter Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT p.* FROM knr_posts p, knr_term_taxonomy tt, knr_term_relationships tr | |
WHERE p.ID=tr.`object_id` | |
AND tt.`term_id`=tr.`term_taxonomy_id` | |
AND (p.post_type = 'recipe_cpt' OR | |
AND p.post_status = 'publish' | |
AND tt.`term_taxonomy_id`=7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment