Home › Forums › General Issues › Update oEmbed field with YouTube no cookie url? › Reply To: Update oEmbed field with YouTube no cookie url?
Putting this in the template file is the best I could come up with. However, now I’m not stoked that YouTube drops a cookie even from the no-cookie URL….
<?php
$iframe = get_field('video');
$iframe = str_replace('youtube.com/embed/', 'youtube-nocookie.com/embed/', $iframe);
?>
<div class="minus6db-video"><?php echo $iframe ?></div>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.