Support

Account

Home Forums General Issues update_field(); not updating either using field key or field name

Solved

update_field(); not updating either using field key or field name

  • Hey, Guys, I’m trying to update a custom field value on a custom post, when inserting the post the update_field() with field name, works fine, but when trying to update the value of that post nothing happens, I’ve tried with a field key and same problem.

    //With field name
    update_field(“banner_image”, $event[“IMAGE_LINK”], $id_event);

    //With Field key
    update_field(get_field_object(‘banner_image’, $id_event)[“key”], $event[“IMAGE_LINK”], $id_event);

  • @elmzelji Have you resolved this issue yet?

  • Yes, I was providing the wrong ID.

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

You must be logged in to reply to this topic.