Query Filters & Pagination: Support targeting nested Query Loops (Parent & Child Queries)

Feature Request:

Allow Query Filters and Pagination elements to support multi-level/nested Query Loops, enabling them to independently target both outer (parent) and inner (child) queries.

Use Case / Example Scenario:

Imagine a layout where terms/categories are fetched first, and products/posts are listed under each category:

  • Outer (Parent) Query: Loop through Taxonomy Terms (e.g., Product Categories like Electronics, Clothing, Home).

  • Inner (Child) Query: Loop through Posts/Products belonging to the current term (e.g., Products assigned to Electronics).

Desired Functionality:

  1. Targeting the Outer Query:

    • Filters can narrow down the categories displayed on the page (e.g., filter categories by name or meta).

    • Pagination handles page numbers for the categories list (e.g., show 4 categories per page).

  2. Targeting the Inner Query:

    • Filters can refine the inner items directly within their respective category block (e.g., filter products inside each category by price, stock status, or rating).

    • Pagination/Load More can paginate the nested items (e.g., paginate the products under a specific category without reloading or breaking the outer query).

Current Limitation:

Currently, applying Query Filters or Pagination within a nested loop architecture either defaults strictly to the top-level query, breaks AJAX reloading for the nested content, or causes scope conflicts between the parent and child query IDs.

Why this is essential:

This feature will unlock advanced layout patterns—such as grouped catalog views, multi-tier directory layouts, and category-first product listings with interactive dynamic filtering—without relying on third-party plugins like WP Grid Builder or custom PHP scripts.