I am working on a single post layout for a custom post type. It has an ACF field group attached to it.
Each post of the post-type belongs to a “Chapter”. The chapter name is one of the fields of the filed group.
On the layout, I have set up a Div with a looper provider (query builder). It loops through all posts, with the additional condition (Meta values) that the looped posts should have the same chapter name as the current post.
This works, and I can consume all posts within the specified (=current) chapter, I can print their title, and I can link to them.
I use this to create some sort of “table of content” for the current chapter. In the table of content, I want all other posts to be cross-linked, while the current post should appear in a different styling (no link, bold). I thought I do this by showing the looped post titel twice: as a button (with link) and as bold text (without link); and use conditions to hide either the button element (if looped post = current post) or the text element (for all other posts in the loop).
My problem: Once I am within the looper, I seem to have no access to info about the current post that I am on. For example, {{post.titel}} gives me the titel of the looped post, not of the current post. I have tried many of the dynamic content fields that are available, but everything seems to live in the context of the active looper. Is there ANYTHING that is still available inside the looper, that references the current post that I am in, and that I can use in the condition to show/hide the text/buttopn elements?