How can I display a list of posts, sorted by one custom field, and filtered by another? The following query string, which sorts by a custom field, works fine:
post_type=lunch_and_learn&orderby=meta_value&meta_key=lunch_and_learn_date&order=desc
But appending this does not work:
&meta_key=lunch_and_learn_status&meta_value=Scheduled
However, the following, complete query string – includes the filter clause but not the sort by clause – DOES work!
post_type=lunch_and_learn&meta_key=lunch_and_learn_status&meta_value=Scheduled
They just don’t work together. What am I doing wrong?