Buy me a coffee

Add Video into Accordion

To add Video into Accordion, just follow these steps:

#1. First, use this code to Page Header Code Injection

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(() => {
const list = $('.accordion-block p:contains("mp4")');
    for (let i=0; i<list.length; i++) {
        const link = $(list[i]).text()
        $(`<video src="${link}" loop autoplay>${link}</video>`).insertAfter(list[i])
    }
for (let i=0; i<list.length; i++) {
        $(list[i]).remove()
    }
})
</script>

Add Video Into Accordion 01 Min

#2. Next, edit Accordion Item > Paste Video Direct URL

Something like this

Add Video Into Accordion 02 Min

The code will convert the Video Text URL to a Video Tag, and it will show as a Video

Add Video Into Accordion 03 Min