Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter toad78

    (@toad78)

    I thought of an error in my code and have updated it, but still don’t see the video. I’ve tried two additional methods and the video still won’t post.

    <div class="leftvid">			
    <?php
    $video = get_field('hero_video');
    if ($video) {
    $video_url = $video['url'];
    echo '<video width="200" height="300">';
    echo '<source src="<?php echo $video_url; ?>" type="video/mp4">';
    echo 'Your browser does not support the video tag.';
    echo '</video>';
    } ?>
    </div>

    <div class="leftvid">
    <?php
    $video = the_field('hero_video', 'option');
    if( !empty($video) ): ?>
    <video>
    <source src="<?php echo $video['url'];?>" type="video/mp4">
    Your browser does not support the video tag.
    </video>
    <!--<p>Your browser does not support the video tag.</p> -->
    <?php endif; ?>
    </div>
    • This reply was modified 9 months, 3 weeks ago by toad78.
    Plugin Support ACF Support

    (@acfsupport)

    Hi @toad78

    hero_video field returns a file URL only not an array. So in your code, replace:

    <?php echo $video_url; ?>

    with just the $video containing the file URL that is:

    <?php echo $video; ?>

    That should work and if it does not then reach out to support directly and they should help out.
    You can open a ticket from here https://www.advancedcustomfields.com/contact/

    Kind regards,
    Noah.

    Thread Starter toad78

    (@toad78)

    Thank you, @acfsupport. I will try that and see if it fixes it. I was trying a combination of ways to post the URL (not noted above) and nothing would post.

    I’ll come back to you.

    Plugin Support ACF Support

    (@acfsupport)

    Hi there!

    If you face further challenges, please create a ticket using our ​support form and we can look into it further.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Video Doesn’t Post’ is closed to new replies.