Support

Account

Home Forums ACF PRO Flexible Content instance ID

Helping

Flexible Content instance ID

  • Hi,
    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.

    Cheers,
    Lars

  • 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.