WP_Query with several meta_query-statements and order by meta_value
I was unable to create a WP_Query – I believe it is not possible to solve this using a regular WP_Query – but managed to create an SQL statement that does exactly what I want: SELECT wp_posts.* FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) INNER JOIN wp_postmeta AS mt1 ON (wp_posts.ID = mt1.post_id) … Read more