Hey,
Please help me! How to display lightbox only once everyday to each user. I mean everyday lightbox appeas once! I don't want to put in local storage as it will display only once but I want to display lightbox everyday one time to user! Please provide me with code as I don't know coding. I hope for reply.
Thanking You,
Dev Vora.
You have to paste code use on page on which you want lightbox to show! Not on lightbox code page!
Can someone please answer me? I really need to know how to do that!
Thank you!
I made sure that the automatically display lightbox is off. However it still doesn't work:
1) How do I control on which page the pop-up will appear on?
2) I have tried to do it, and it the lightbox didn't show u at all.
Thank you!
You have to add on page code where you want to show it!
And make sure automatically display lightboxes is set to off.
Hi, I have a follow-up question:
1) Where should I paste the code? under page or site code?
2) I used this code, but everytime I refresh the website, it still pop-up the lightbox.
Thanks,
Adam
Thank you very much!
You solved my big problem!
I appreciate you help.
thanks!!!
Hi,
I think the best solution is, when the popup is displayed, save today's date to local storage. Then, every time the page is loaded, check local storage for the value. If it's today - don't show the popup, if it's a different date - display it and save today's date again, and so on..
The code can look something like:
import wixWindow from 'wix-window'; import {local} from 'wix-storage'; $w.onReady(function () { let today = new Date().toDateString(); let popupDate = local.getItem('popupDate'); if( popupDate !== today) { wixWindow.openLightbox("<LightboxName>"); //change to the actual lightbox name local.setItem('popupDate', today); } });
Can someone reply plz????