WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Tried more than a few variances to enable my pre_get_posts callback function to display posts that possess one, or both, of 2 separate meta_keys, upon display to then orderby a single meta_key.

Here is a pastebin of the various attempts

Namely I am able to display correctly via 2 separate keys but am unable to then orderby a single one of them, what am I missing to do this?

share|improve this question
If something happens to that pastebin this question becomes unintelligible. Please include your code in your question. It looks to me like the last attempt, with the meta_query is the closest to correct. I don't have time to take a shot at a solution right now though. – s_ha_dum Mar 26 '13 at 14:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.