Hi there,
So I am building a dynamic menu for my posts, with anchors to the headlines in the post. The looper provider loops through an ACF Repeater field which is containing the headlines for the specific post.
In order to make the menu work, I need each looper item to have a unique id, so that I can create an anchor-link for that headline. At the moment, I am using the looper item index as anchor-value, but it doesn’t seem like the smartest way to make it work.
I know each custom field have a corresponding id field like “field_xxxx…”. How do I access that value for a looper item?
It would be best if the anchor could consist of the looper item value without spaces but I do not know how to do this in ACF - if even possible? E.g. the looper item value “Here is a headline” should be “here-is-a-headline” for the anchor-link.
I hope my question makes sense. Let me know what you think.
Thanks