Snippet for Metabox fields in layout builder

/**
 ** Some metabox fields don't save the right value for display, this can be used to output with metabox function to get correct display value
 ** 'el-99ck4' is name in the item settings in layout builder,
 ** see https://facetwp.com/help-center/developers/hooks/output-hooks/facetwp_builder_item_value/
 ** change 'name_for_meta' to the name of the meta box field, see for more info and additional
 ** functions for getting meta https://docs.metabox.io/displaying-fields/
 **/
add_filter( 'facetwp_builder_item_value', function( $value, $item ) {
    if ( 'el-99ck4' == $item['settings']['name'] ) {
        $value = rwmb_meta( 'name_for_meta' );
    }
    return $value;
}, 10, 2 );