I designed a homepage with a video background and want the logo and navigation to be pinned to the middle of the screen. The only element I could find that I can pin to the middle is a light box. The problem is that the light box only appears once per site visit, meaning that whenever a user navigates away from the page and back again, the home page turns to a dead end as there is no navigation!
I would appreciate any suggestion. It is important that logo and navigation are centred horizontally AND vertically.
I wrote to Wix and they say it will only pop up once and I can’t find anything in settings. Had a programmer look into it and he couldn’t find it. If you could tell me where that setting is that would be amazing.
@givemeawhisky Thanks, but this does not make the lightbox appear every time a user goes back to the page from within the site. Mine only appears again when reloading the site.
@designstudio
Yes so then set the trigger so that it appears when the user does something on the page like moves to a certain area on your website or clicks on an element etc. No:The lightbox does not appear when a site visitor enters a page. Instead, you can link to it from elements on your site.
You don’t have to just use the simple yes option and have it appear on every page when the user first loads up the page. Yes:Your lightbox is displayed when a page loads. Click theWhich pages is it on?field and select the pages you want the lightbox to appear on, or select theFirst page visitor seescheckbox.
A trigger would only load the light box and not the homepage. I wanted the trigger (company’s logo in the header) to return the user to the homepage. When getting to the homepage the light box needs to appear. Currently it does only load once, so any subsequent return to the homepage means there is no light box. As the light box contains the navigation, the user is stranded there.
My workaround is that I added the video from the homepage as the background of the light box. By doing that I created a light box that looks the same as the homepage. In terms of the web address the user is still on the page they triggered the light box from though.
To sum it up I have found a solution but I have not found answers to my questions:
How can I make a light box load automatically every single time a page is visited
How can I pin an element other than a light box to the middle of the screen.
So anybody who could truly answer either of these questions I’d love to hear it!
Thanks
Pinning an element is not however a code related issue and you would be better going through Wix Support for more help on pinning.
For the lightbox to load every time a page is visited and not just the first time the user views it, then simply do something like an onViewportEnter event handler function at the top of your page in your site code so that when any page loads that function will kick in and trigger the lightbox to show.
Pinning an element to the centre of the screen is currently not a regular option with anything other than a light box, so it would have to be solved by code if that is possible
Could you expand on the code for having the light box appear every time?
Thanks,
I replaced the code that was there for the home page with the code above, changed the lightboxname to my light box but it still doesn’t come up…
So I guess I’m doing it wrong?
That’s what I did first and what didn’t work. See my post from 3 hours ago. You simply replied “Post your code here” So I replaced “write your page related code” in the below code:
/ /For full API documentation, including code examples, visit https://wix.to/94BuAAs
$w.onReady(function () {
//TODO: write your page related code here...
});