I have the following code that I can't get working. I have two cloneable fields that are being output as one entity (URL and thumbnail image). These are cloned fields using the Meta Box Plugin by Deluxe Blogging, so I need to be able to do an if statement if there is nothing at all and then I need to be able to repeat the thumbnail and URL twice (if there are two separate entries).
<?php if
$videoID = get_post_meta( $post->ID, '_danieltiger_repvid', true );
$videoThmb = get_post_meta( $post->ID, '_danieltiger_repthmb', true );
foreach ( $videoID as $value )
{
echo '<div class="video-pops">';
echo '<a class="thumb video-pop-lb" data-video-pid="';
echo $videoID;
echo '">';
echo '<span></span>';
echo '<img width="157" height="88" alt="<?php the_title(); ?> image" src="';
echo $videoThmb;
echo '" /></a>';
echo '</div>';
} ?>
<?php } ?>
The example code from Deluxe Blogging on outputting cloned fields is the following:
$metas = get_post_meta( get_the_ID(), 'meta_key', true );
foreach ( $metas as $meta )
{
echo $meta;
}
I can't seem to figure out how to work in the two separate values. I have another field I'm cloning and outputting in my theme correctly but I just can't get the gist on this one.
TIA!