Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Anh Tran

    (@rilwis)

    That’s a good question! Thanks for asking!

    Basically migrating to Meta Box isn’t hard. If you save a value in a single row in the post meta table, then you just need to register a field with id = meta key, that’s all.

    To understand how meta value is saved in Meta Box, please read this docs:

    https://metabox.io/docs/how-post-meta-is-saved-in-the-database/

    Best regards

    Thread Starter nicodelienne

    (@nicodelienne)

    Thanks for reply !
    So if I understand, I must refer to the old field’s id to create the meta box.

    Like this :

    // 1st meta box
        $meta_boxes[] = array(
            'id'         => 'personal',
            ...
            'fields' => array(
                array(
                    'name'  => __( 'Full name', 'textdomain' ),
                    'id'    => $prefix . 'id_of_my_old_field',
                    'type'  => 'text'
                ),
            )
        );
    Plugin Author Anh Tran

    (@rilwis)

    That’s right. Just a note: $prefix . ‘id_of_my_old_field’ = ‘your old field id’.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing méta box system’ is closed to new replies.