Custom query, multiple custom keys
I’m not an SQL expert, but I would think you might have to JOIN twice to pick two distinct rows out of wp_postmeta: $featuredquery = ” SELECT wposts.* FROM $wpdb->posts wposts JOIN $wpdb->postmeta article_level ON ( wposts.ID = article_level.post_id AND article_level.meta_key = ‘article_level’ ) JOIN $wpdb->postmeta article_genre ON ( wposts.ID = article_genre.post_id AND article_genre.meta_key = … Read more