Home Forums ACF PRO Flexible Content instance ID


Flexible Content instance ID

    • Larzan

    • February 10, 2020 at 7:40 pm

    is there a way to uniquely identify a flexible content layout instance?
    When i hook into save_post i can see that the entries in the flexible content field do seem to have a unique identifier (although the last character just seems to be an index value), but when i later retrieve the content of the field, even in raw mode, i only get the index and not the unique identifier.

    I would need an identifier for a layout that is unique for that FC field at least, and does not change when the layouts are reordered.

    As i haven’t found anything like it in the docs i started adding an automatically added, hidden, unique identifier to all layouts and use that one, but i was wondering if there is indeed already sth. like it in ACF PRO.


  • The id you are referring to is an ACF thing and may not always be the same. I do this as well so that I can give the containers of my flex field content ID values. What I do is add a text field that is read only and I populate that field with a unique identifier, very similar to the hidden field you are using. There is nothing built into ACF to do this.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.