Variables

{{ id }}

{{ id }} prints the current WordPress post or page ID.

Example#

phpresources/views/single.php
<article data-post-id="{{ id }}">  <h1>{{ title }}</h1></article>

Inside a query loop, {{ id }} changes to the ID of the current item in that query.