WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help with Nested Queries using meta_query (3 posts)

  1. Griffin
    Member
    Posted 2 years ago #

    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

  2. vtxyzzy
    Member
    Posted 2 years ago #

    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.

  3. Griffin
    Member
    Posted 2 years ago #

    Good catch, works like a charm now.

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.