Home Forums General Issues Render Video from a wordpress shortcode Reply To: Render Video from a wordpress shortcode

  • And here with dynamic poster loaded in an image field (return format URL):

        $link_data = get_field('video_featured'); 
    $link_poster = get_field('poster_image'); 
        $link = $link_data['url'];  
        <video width="200" height="300" playsinline autoplay muted loop disableremoteplayback poster="<?php echo $link_poster; ?>" >
            <source src="<?php echo $link; ?>" type="video/mp4">   
            Your browser does not support the video tag.
    <?php } ?>

    I’m not a developer, just an enthusiast, so if this can be improved please feel free todo so. Meanwhile I’m so happy it works! 😀