<?php
add_action( 'rwmb_meta_boxes', 'userprofile' );
function userprofile( $meta_boxes ) {
$meta_boxes[] = array(
'id' => 'useroptions',
'title' => 'User Profile',
'type' => 'user', // Specifically for user
'fields' => array(
array(
'name' => __( 'Country', 'textdomain' ),
'id' => 'country',
'type' => 'select_advanced',
'options' => array(
'country-us' => 'United States',
'country-uk' => 'United Kingdom'
),
),
);
return $meta_boxes;
}
?>
I'm trying to display a select>option in the front end that will allow the user to select their option, but with all the documentation I haven't been able to find the for each
example.