Insertion manually for group fields

Support MB Group Insertion manually for group fields

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3088
    brightcreationsbrightcreations
    Participant

    Please how can saving group of fields into database using add_post_meta ?

    #3094
    Anh TranAnh Tran
    Keymaster

    The group's value is an array of sub-fields' values and is saved as a single entry in the database. You can use the following code:

    $value = array(
        'sub_field_value_1',
        'sub_field_value_2',
        // ...
    );
    update_post_meta( $post_id, 'group_id', $value );
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Insertion manually for group fields’ is closed to new replies.