Created
February 19, 2024 17:28
-
-
Save gdarko/f4f29281ecdcee506c0ea28f5ffae6ad to your computer and use it in GitHub Desktop.
Query uploaded videos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Loop videos | |
$database = new WP_DGV_Db_Helper(); | |
$videos = $database->get_videos([ | |
'author' => 'USER_ID_GOES_HERE', | |
'posts_per_page' => 5, | |
'paged' => 1, | |
]); | |
foreach($videos as $video) { | |
$video_url = $database->get_vimeo_link($video->ID); | |
echo '<iframe src="'.$video_url.'" width="420" height="240"></iframe>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment