Support

Account

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

  • @WPDragon i should have mentioned i just made up the markup without testing or looking at lightbox documentation — also if your using a repeater try this for testing:

    					
    <?php //For Use with Repeater Field 
    $videos = get_field('video');
    $videos_raw = get_field('video', FALSE, FALSE);
    									
    								
    //Add the Thubmnail to the $videos object
    									
    									foreach($videos_raw as $key => $video_raw) : 
    								
    											$videos[$key]['video_thumb'] = get_video_thumbnail_uri($video_raw['field_5449746362c3d']); 
    //Replace 'field_5449746362c3d' with your field's Field key (obtainable by going to screen options in the fields admin, and setting 'Show Field Key' to 'Yes')
    								
    endforeach;
    									
    								
    								
    //Loop through the $videos object
    									foreach($videos as $video): ?>
    									
    VIDEO THUMB URL: <?php echo $video['video_thumb']; ?>
    										
    							
    										
    										VIDEO EMBED: <?php echo $video['video_url'] ?>
    																		
    <? endforeach; ?>