Support Forum
Support › MB User Meta › ✅"mb_user_meta & mb_rest_api" has problem › Reply To: "mb_user_meta & mb_rest_api" has problem
Hi Jiro, please change the code for meta boxes to:
add_action( 'rwmb_meta_boxes', 'prefix_register_meta_boxes' );
function prefix_register_meta_boxes( $meta_boxes ) {
$meta_boxes[] = array(
'id' => 'personal',
'title' => 'Personal Information',
'type' => 'user', // Specifically for user
'fields' => array(
array(
'name' => 'test mb for user',
'desc' => '',
'id' => 'test4',
'type' => 'text',
),
)
);
return $meta_boxes;
}
Your code has 2 issues:
type
of the field should not be string
, it's text
.$meta_boxes
.I've just made a test with Postman and here is the result: