Support

Account

Home Forums General Issues updat_field not working for postobject\'value Reply To: updat_field not working for postobject\'value

  • Hi @littledevil

    What field type is ‘genrelist’?

    If it is a post_object or relationship field, you can’t save “MYSTERY” as the value, you instead need to save a numeric value of the post’s ID.

    If the field type is a text based field, your code should work.

    If the field ‘genrelist’ is a new field and has not yet been saved on the fields, please read over the docs below to understand why you need to use the field_key instead of the field name
    http://www.advancedcustomfields.com/resources/update_field/

    Thanks
    E