Hi,
I am trying to create a Lightbox that automatically pops up when the user visits the website for the first. I have read through the Creating a One Time Popup [(Velo Tutorial: Creating a One-Time Popup | Help Center | Wix.com]((Velo Tutorial: Creating a One-Time Popup | Help Center | Wix.com) ) , and understand how to create this and had no issues doing so. I was wondering though how can you specifically for the lightbox not to display if a certain page is loaded. Basically I want this lightbox to appear on all pages if they haven’t visited the website before except for 2 specific pages. I am not sure how to adjust the code to be able to accomplish this.
Any help would be appreciated. Thanks.
Modify the code to something like:
Get current page URL. If page equals this or that then dont trigger one time popup function, or else do trigger.
Hi Code Queen Nayeli. Thank you for response and help.
I have tried to setup and if else statement to do as per your advice, and for the most part think I have been able to accomplish that. The problem lies in the fact that I want this to show on all pages except the Site Under Maintenance but only when that page is set as homepage. But I can’t seem to get the code to be able to distinguish this page when set to homepage vs the normal homepage.
I think I will just hide the code when the page is activated as homepage as a work around. Thanks.
Ah, yes. That would be a different logic since you are switching the home page but the home will remain with the same URL after it is switched.
Try doing something slightly different. Add a session variable on the maintenance page. To code something like: If variable is not maintenace then continue to trigger lightbox, otherwise hide lightbox.
@code-queen
Hi. Thank you for your response. I have no used session variables before. Do you have any suggestions on how I would go about writing or implementing the code? Thanks.
@admin98845 So the tutorial that you first mentioned actually uses that function.
This is more on that code function: local - Velo API Reference - Wix.com