Support

Account

Home Forums General Issues Why is the value of the link field serialized?

Helping

Why is the value of the link field serialized?

  • Is there a reason for the ‘link’ field being stored in a serialized form?

    I created a field of the ‘link’ type.
    If I output the link by pulling the value from post meta, it comes back in serialized form.

    I do get the correct – unserialized – value back if I use get_field. So it’s not a huge deal.

    But most of the time I prefer to access values directly from post meta using the wordpress native functions.

  • Any field in ACF that holds multiple values is stored as a serialized array.

    In the case of the link field 3 pieces of information are stored, the URL, The Link Text, and whether or not to open in a new window. This corresponds to the values returned by the native WP link popup that ACF used when editing a link field.

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

You must be logged in to reply to this topic.