Enable lightbox for button elements in Divi Theme Builder

Product:

WonderPlugin Lightbox

Question:

I am using the Divi WordPress theme.

Divi has button elements. I wonder how could I enable lightbox for a button? I would like to open a YouTube video in the lightbox on clicking the button.

Answer:

The following steps are for the Divi "Default Builder". If you are using the "Visual Builder" instead, to test the lightbox effect, please exit the visual builder and test it in the front page. The lightbox effect will not work in the "Visual Builder" page.

1. In Divi Builder, insert a Button module.

2. In the "Button Module Settings" dialog, Content tab, enter the button caption, enter the YouTube embed URL to the "Button URL" input box.

Enable lightbox for divi theme builder

3. In Advanced tab, enter wplightbox to the "CSS Class" input box.

divi builder lightbox

4. Save the page then preview the button lightbox in the front page.