Trying to create a custom hero slider which will use a repeater field to get its data. The thing is that I want to use media that both images and videos in the slider.
Should I use the file ACF? Has anybody done this?
Hi lefteris,
You can add video or images to a slider with a repeater. You can upload an .mp4 video to WordPress and have a conditional check for the video field to add the proper <video> tag with different sources.
Hi Anastasia,
Thanks for your input.
I decided for a similar approach. Since the HTML5 video requires a poster image I decided to use the image and the yes/no field. The user will upload videos that have the same file name as the poster image and use the check field to confirm that it’s a video. If true then it will provide the required code for a video hero.