I want to build a block where I can select a CPT post in the backend and the block should display some custom fields of the selected post in the front end.
So I created a field group with a WordPress post field, where I selected the CPT as Post Type.
In the Render Code I want to retrieve the ID of the selected post and either send it to a php function or use the values of some custom fields of the post directly.
When I enter this into Render Options (Code):
<h2> Output: {{ grid_select_post }}</h2>
It gives me a html link with the title of the post.
How can I retrieve the ID instead?
Thanks.