Filter: bricks/query/force_is_looping
Forces Bricks\Query::is_looping() to return true. This is useful in AJAX contexts (like popups) where you need to simulate being inside a query loop to correctly render dynamic data that depends on the loop context.
Parameters
Section titled “Parameters”$force(bool): Whether to force the is_looping state. Default isfalse.$query_id(string): The ID of the query being checked.$element_id(string): The ID of the element being checked.
Example usage
Section titled “Example usage”add_filter( 'bricks/query/force_is_looping', function( $force, $query_id, $element_id ) { // Example: Force looping for a specific element ID if ( $element_id === 'my_element_id' ) { return true; }
return $force;}, 10, 3 );Was this helpful?
A quick vote and short notes help us improve these docs faster.
Leave a note for us
Please do not include passwords, license keys, or personal data. We store submitted notes to improve the docs.
Thanks for sharing feedback. We're using it to improve these docs.