• Hi,

    I’m currently working on a new theme and want to implement a video background which should be replaceable by the user via Customizer.

    I’ve already added a WP_Customize_Upload_Control to Customizer and can choose a media file here for background. At the moment any media file could be selected.
    If I select a video file, the get_option()-method returns only an id.

    What would be the correct way to either limit the WP_Customize_Upload_Control to videos or implement the frontend part so that videos would work as well as images for background?

    How do I get the finished <video>-tag from WP? Or do I have to build it on my own?

    Thank you!

The topic ‘video option in Theme’ is closed to new replies.