In this members-only tutorial, we shall build a custom YouTube video carousel with videos playing in a lightbox when the thumbnail is clicked by
registering a Custom Post Type called `video` having a `video_url` custom field
adding video entries while providing the URL of a YouTube video in each
adding a Code Block in Oxygen with the code to output the video entry image (featured image and if not present, video thumb from YouTube), title and URL using a custom WordPress query and loop, initializing Owl carousel on the videos container and adding the necessary CSS
Requirement: The ability to upload files to a plugin directory. This needs to be done via cPanel file manager or a FTP client.
Install and activate Pods.
Add a new video post type.
Add a video_url Website type custom field.
In the Advanced Options tab, tick "Featured Image" under Supports.
Save the pod.
Let's load the CSS and JS files of Owl on the page where the slider is to be shown (homepage in this example) and register a custom size for images in the carousel.
Edit plugin's plugin.php file.
Replace the code inside sk_enqueue_files() with: