I’m not sure whether this should be reported as a bug or a feature request. I expected the new component properties as Dynamic Data feature to allow a Select property to control a taxonomy query, but the selected value does not reliably affect the frontend results.
Steps to reproduce:
Create WordPress posts assigned to different categories.
Create a component containing a Posts query loop
Add a component property of type Select, with the reference key topic.
Add dropdown options using category names as labels and their numeric term IDs as values.
Configure the loop’s advanced taxonomy query:
Taxonomy: Categories
Field:term_id
Terms:{prop.topic}
Operator:AND
Insert the component on a page and select a category.
Expected: The instance displays only posts belonging to its selected category.
Actual: The instance display the all posts, despite having different category selections. Using a literal category ID instead of {prop.topic} filters correctly.
The goal is to let clients choose a category through a simple component dropdown, without exposing the entire query.
Is this usage already supported and therefore a bug, or would support for property references in query settings require a feature request?
I could reproduce this with Bricks 2.5-rc. The property itself resolves fine (a heading with {prop.topic} shows the correct term ID per instance), but every instance’s loop shows all posts.
According to Claude, the cause is the inline CSS generation: in wp_head, Assets::generate_css_from_element() runs each loop query once (new Query) to generate the loop styles. At that point there is no component property scope yet, so {prop.topic} doesn’t resolve and ends up as an escaped literal in the tax query, which returns all posts. That Query instance is stored in Query::$query_history, and when the body renders, Query::__construct() finds it under the same element ID (e.g. loopid-instanceid) and reuses the unfiltered result instead of building the query again with the property value.
To confirm: clearing Query::$query_history right after wp_head makes each instance filter correctly. A literal term ID works because it doesn’t depend on the component scope. “Cache query loops” makes no difference.
Probably affects any {prop.*} in query settings, not just the tax query (only tested that one).