Yep, just use
<?php if( ( $video_thumbnail = get_video_thumbnail() ) != null && !is_single() ) { echo "<img src='" . $video_thumbnail . "' />"; } ?>
Thread Starter
Joseph
(@joseph94)
Hmm. Didn’t seem to do what I want. The video thumbnail still displays fine on my homepage, but still displays on the single post page. If it’s a thumbnail specifically from the video, then I don’t want it to show up at all on the single post.
This is what I have in my single.php file:
<div id="single-thumb">
<?php if( ( $video_thumbnail = get_video_thumbnail() ) != null && !is_single() ) {
echo "<img src='" . $video_thumbnail . "' />"; } ?>
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail('post-thumb'); ?>
<?php } ?>
</div>
So the plugin settings have the video thumbnail set as a featured image? If that’s the case you can try this in single.php:
<?php if( get_video_thumbnail() == null && has_post_thumbnail() ) { ?>
<div id="single-thumb">
<?php the_post_thumbnail('post-thumb'); ?>
</div>
<?php } ?>
Thread Starter
Joseph
(@joseph94)
That did the trick. Thanks for your help!