[Resolved] Lightbox link image in page hero

Home Forums Support [Resolved] Lightbox link image in page hero

Home Forums Support Lightbox link image in page hero

  • This topic has 11 replies, 3 voices, and was last updated 4 years ago by David.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1193147
    takkularapsis

    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?

    #1193149
    Leo
    Staff
    Customer Support

    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.

    #1193173
    takkularapsis

    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

    #1193183
    Leo
    Staff
    Customer Support

    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 🙂

    #1193202
    takkularapsis
    #1193212
    Leo
    Staff
    Customer Support

    Just to confirm, the HTML is exactly the same in both cases?

    Looks different from the inspector:
    https://www.screencast.com/t/PKlIRoBv5LR

    #1193421
    takkularapsis

    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>

    #1193582
    David
    Staff
    Customer Support

    Hi there,

    which lightbox plugin are you using ?

    #1193619
    takkularapsis

    Hi,

    Im using Simple Lightbox.

    #1193627
    David
    Staff
    Customer Support

    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.

    https://en-gb.wordpress.org/plugins/responsive-lightbox/

    #1193644
    takkularapsis

    Hi,

    Changed the plugin and it worked. Thank you. Have a nice weekend!

    #1193646
    David
    Staff
    Customer Support

    glad to hear that 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.