Get 30% discount on lifetime membership by using BFCM2023 coupon.
Offer ends on 30th Nov 2023 at 11:59:59 PM UTC.

Dynamic Post ID in Query Loop

Updated on 6 Oct 2022

Looking for a unique ID for each post’s row in the output of Bricks’ Query Loop?

Here’s how: Add an id attribute for the element on which query loop is enabled with the value being:


One of the use cases is that this enables you to link to these posts from the Nav Menu.

Update: If you want to have incremental post IDs, you could use dynamic tag added by BricksExtras like this:



Instant access to all 250+ Bricks code tutorials with BricksLabs Pro

Leave the first comment