Hello, i have created a meta box oembed with clone:
array(
'id' => $prefix . 'oembed_1',
'type' => 'oembed',
'name' => esc_html__( 'Embed Video', 'media' ),
'desc' => esc_html__( 'Embed description', 'media' ),
'clone' => true,
'add_button' => esc_html__( 'Add video', 'media' ),
'sort_clone' => true,
),
it works very good except i can not get the videos with foreach
i have a vimeo and a youtube video.
$values = rwmb_meta( 'oembed_1' );
foreach ( $values as $value )
{
echo do_shortcode( $value );
;
}
it gives invalid argument to foreach.
$oembeds = rwmb_meta( 'oembed_1' );
echo $oembeds;
Here it just shows both videos.
it does not return array as usual.
UPDATE:///it returns string not array
-
This topic was modified 8 years, 5 months ago by
phaidonas.