How to get queried object inside a Query Loop on a page?

Hi everyone,

I’m running query loops on my site and currently my Homepage is as follow:

  • Loop through all term of a Taxonomy (Tops) of a Custom Post Type (Sites) - Query Loop available in the UI

Problem is, in a code block, I can’t seem to be able to retrieve the value of that term_id. get Queried Object only output the Page data itself, not the loop I’m in.

Any help is appreciated.

1 Like

Try Loop Item ID and Loop Item Object in Bricks – BricksLabs.

4 Likes

Works like a charm. I wish we could use that in a nested custom query loop

in the bricks query builder itself there is a no result text option. and it can be dynamic

1 Like