• Resolved elandgren

    (@elandgren)


    Hola!

    I’ve been trying to generate a query_post call to get a list of posts that have 2 or more meta_values, but it’s been impossible.

    Basically, let’s say that all posts have a custom field called “age”.. and I want to get (using query_posts function) all posts which have age=22 and age=25.

    I’ve tried:
    query_posts(‘meta_key=age&meta_value=22&meta_key=age&meta_value=25’)
    query_posts(‘meta_key=age&meta_value=22&meta_value=25’)

    but, obviously, I’ve got no success… Anyone knows how to solve this?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query_posts using multiple custom values (meta_value)’ is closed to new replies.