Making a custom button close a lightbox/popup.


I created a lightbox/popup to open automatically when landing on my home page.

For this lightbox I have created a UX Block, and I choose a “pre-designed layout” from the Flatsome studio. The layout has a button ‘Shop Now’ on it.

I used the plugin PopUpMaker to call the UX Block, using its shortcode. All good so far.

BUT: How do I get the ‘Shop Now’ button to close the lightbox? Is there a code-snippet I can insert in the link-field or class-field of the button? (I know that there’s a also a close button in the top right corner).

The home page in question is (the lightbox in question will automatically popup at first visit).

I hope that this is something you can help me with!

Thank you!

Hi! I could help you with some recommendations. I recently finished making my WordPress popup window that I worked on for some time to make look good. For me, my website must be comfortable for users. I know that popup windows bother many people, but I put a lot of effort into making the popup window useful both for users and me. So I found a no-code popup builder with which I did all this work. I recommend you to use it, and this question you have now will disappear. Everything will be much clearer and easier for you.