Archived topic
Lightbox link image in page hero
11 replies · Started by takkularapsis on March 12, 2020
Hi,
I have text link in page hero that should open image. Lightbox plugin and this code doesnt work...?
<a title="" href="http://nige.fi.www40.zoner-asiakas.fi/wp-content/uploads/2020/03/LTX_Alue.jpg"><img />(Lähitaksi alueelta)</a>
If i put this line anywhere else, lightbox opens.
So is there a way to open lightbox in page hero?
Hi there,
Have you fixed this?
Looks like it's working for me:
https://www.screencast.com/t/p1Fykb7l
I noticed that your HTML above has a img closing without an opening.
Thank you for quick reply.
It doesnt open the link in lightbox, it opens it in new page.
I tryid also with this link and it opens in lightbox if i put it in everywhere but page hero.
<a rel="lightbox" href="http://nige.fi.www40.zoner-asiakas.fi/wp-content/uploads/2020/03/LTX_Alue.jpg">(Lähitaksi alueelta)</a>
It should look like this https://snipboard.io/AyQ4PC.jpg
The page hero content just takes normal HTML like the page content so I'm not sure why it isn't working.
Can you start a test page, add the link in page hero and page content so I can try to spot the difference?
Let me know :)
Just to confirm, the HTML is exactly the same in both cases?
Looks different from the inspector:
https://www.screencast.com/t/PKlIRoBv5LR
Hey,
Now it is the same ( as under this ), i dont know how was it changed earlier. It still does the same and doesnt open lightbox...
<a href="http://nige.fi.www40.zoner-asiakas.fi/wp-content/uploads/2020/03/LTX_Alue.jpg" rel="lightbox">(Lähitaksi alueelta)</a>
Hi there,
which lightbox plugin are you using ?
Hi,
Im using Simple Lightbox.
Looks like that plugin only looks for links in the_content of the Post or Page, which the Header Element sits outside of:
Have you tried another plugin? eg.
Hi,
Changed the plugin and it worked. Thank you. Have a nice weekend!
glad to hear that :)