How to use a dynamic term id for the query block

How to use a dynamic term id for the query block