Hi Ale,
You're calling the field cellclasses
, which is a sub-field of a group style
. So the function rwmb_meta
returns nothing, thus the next foreach
loop doesn't work.
You should get the value of the group style
first, then get the value of sub-field. Like this:
$style = rwmb_meta( 'style' );
$cell_classes = isset( $style['cellclasses'] ) ? $style['cellclasses'] : array();
foreach ( $cell_classes as $cell_class ) {
echo $cell_class;
}