Calling this inside the render_field hook works for me:
get_the_ID()
SOLVED
The “update” is, check my work for freakin typos! /tears
Carry on…
I’m having the same problem. The docs say to use the original poster’s approach, which does not work. Any updates? Setting meta_type does not work for me either.
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>
Putting something like this in the template is the best I could come up with:
<?php
$iframe = get_field('video');
$iframe = str_replace('youtube.com/embed/', 'youtube-nocookie.com/embed/', $iframe);
?>
<div class="minus6db-video"><?php echo $iframe ?></div>
Does not work for me. Not sure why this would be on render of the input (?) and not use update_value. I’ve posted as a separate question in General.
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.