I have 2 choices on the edit post page to insert an video ID from either vimeo or youtube. The user needs to select, with a select field (channel), if he wants to embed video from one or the other.
<?php if (get_field('channel') == 'Youtube') {
echo get_field('youtube_video_id');
}
if (get_field('channel') == 'Vimeo') {
echo get_field('vimeo_video_id');
}
?>
Now I'd like this to overrule the_post_thumbnail. So when a video is posted is shows the video instead of the thumb. Is that possible?
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( has_post_thumbnail()) : ?>
<?php the_post_thumbnail(); ?>
*** MAGIC HERE I GUESS? ***
<?php endif; ?>
<?php endwhile; else: ?>
<p>Nothing here</p>
<?php endif; ?>
Hope somebody can push me in the right direction. Or am I doing this the other way arround? I'm my PHP is still a learning curve.
Thanks, /Paul