Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to add a "play" icon overlay on my video thumbnail, like this:

<img src="play.png" border="0" style="background:URL(image.jpg) center center black;" />

My image.jpg for the background comes from this function:

<?php video_thumbnail(); ?>

This is set by the "Video Thumbnails" plugin. It works well when used with 'img src=' but doesn't work within CSS. Are there any workarounds?

Edited to add: <?php echo video_thumbnail(); ?> and <?php echo $video_thumbnail; ?> don't work either

share|improve this question
Got it to work, though not great: would prefer to avoid using exact page ID and background-size. style="background:URL(<?php echo $thumbnail = get_video_thumbnail(1492); ?>) center center no-repeat; background-size: 100px 100px;" –  Phantasmix Aug 5 '13 at 2:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.