Home › Forums › Add-ons › Flexible Content Field › Give flexible fields slug IDs automatically. › Reply To: Give flexible fields slug IDs automatically.
you can use get_sub_field() inside the filter.
Layouts do not have “IDs” built into ACF. If you want an ID then you need to build a field for that.
I do the same thing. I have a field in layouts that I make read only. I auto generate the value for these fields. The field is always named the same. This allows the client to copy and paste the ID from that field. It also allows me to auto generate links and navigation based on the field. Actually what I have a field group with layout settings that I clone into every layout. It consists of all of the common settings for every flex layout added.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.