WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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

I made custom post type and used a meta query …

For this link:


… I want this this meta query to apply:

'meta_query' => array(
                'key' => 'ipt_country',
                'value' => $qv['ipt_country']
                'key' => 'ipt_city',
                'value' => $qv['ipt_city']

How can I do that?

share|improve this question

It is a little more convoluted, but main queries for admin can be modified roughly in a same way as front end. You would need to:

  1. hook into pre_get_posts
  2. check for is_admin()
  3. check for is_main_query()
  4. check for specific page you want to adjust
  5. apply your adjustments to the query if all matches
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.