WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Help with Nested Queries using meta_query

[Resolved] Help with Nested Queries using meta_query

  • Griffin
    Member

    @rgriffinj

    I’m trying to build a query that lists posts of a custom type with specific custom field values. Then I need to list children of each of those posts within the post, and those children also need to be filtered by specific custom field values.

    Here’s my current code, which isn’t working. Any help would be greatly appreciated.

    Thank you!

    http://pastebin.com/z3qZiXni

Viewing 2 replies - 1 through 2 (of 2 total)
  • Looks like your second query object is named the same as the first = $the_query.

    Try changing the second one from $the_query to $my_second_query or something similar.

    Griffin
    Member

    @rgriffinj

    Good catch, works like a charm now.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Help with Nested Queries using meta_query’ is closed to new replies.