Support

Account

Home Forums ACF PRO YouTube Thumbnail Object with oEmbed field? Reply To: YouTube Thumbnail Object with oEmbed field?

  • @EbbandFlow, well…im trying to get this to work with the Repeater.

    At first, I had an ‘endwhile’ error – but I believe that was due to what I assume was a typo in the code above.

    You had:

    foreach($videos as $video): ?>

    and I switched the colon to a semi-colon – and that seemed to fix the ‘endwhile’ error that I was getting.

    foreach($videos as $video); ?>

    Basically, the steps I did was…

    — I copied and paste the code you included specifically for the Functions.php

    — I then, used the recent Repeater code above on my template page where I wanted the video thumbnails to show.

    — I created a Repeater field type, with the field named as: ‘video’

    — Within the Repeater field type, I created a Sub Field (oEmbed) named: ‘video_url’

    — The field key I am using (as mentioned in the code) is from my Repeater field type (‘video’) ex: field_544302b1vr92e

    — I then go to my created post, and add a Youtube URL (as usual) within the repeater section and update the post page…

    At this point, I dont get any errors – but, I also do not get any YouTube Thumbnail or videos results either…hmmm…am i missing something? :-/