• Resolved delpiero223

    (@delpiero223)


    Hi,

    I really like the Meow Lightbox plugin, but stumbled upon an error today: I’d like to link one picture to a custom external URL so that users are redirected to the 3rd party website when clicking on the picture.

    However even as Custom URL is set correctly in the WordPress Editor (Gutenberg) clicking on the image results in opening the Lightbox not the external URL. Any way to fix this?

    Thanks in advance,
    Peer

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello @delpiero223,

    Thank you for your feedback, one way I think we could solve your issue is by using our “anti-selector” setting.

    Basically, saying to the lightbox don’t open the lightbox on the following “anti-selector” elements.

    Would it be possible maybe to add a specific class to the image you want to remove from the lightbox scope?

    For example, you could add the custom class “no-lightbox” to your gutenberg block, and in the lightbox “anti-selector” plugin add “.no-lightbox”?

    Best regards,
    Thomas

    Just imagine a website with 100.000 photos like https://www.fotowissen.eu. To change the Class of each photo directing externally could take months. How much effort would it be to add a selector in Meow-Lightbox?

    Plugin Author Jordy Meow

    (@tigroumeow)

    Hi @sir-peter,

    There is actually already a selector in the Lightbox, so it should be not a problem for you ??

    Hello @sir-peter,

    In this situation, you could first make sure that your theme is not already giving a specific class to images linking outside of your domain ( or on the wrapping a element ), and if not, then you could always add it programmatically, for example via Javascript? ie. checking for all images if they have are wrapped in a link pointing outside of your domain, and if so give them a specific class.

    That being said, I think we could find a cleaner way to do it with your current markup, could you please give me the URL of a page of https://www.fotowissen.eu containing an image that should open the lightbox, and one that shouldn’t ?

    Best regards,
    Thomas

    Dear Thomas,

    https://www.fotowissen.eu/test/

    Tx for your support!

    Dear Thomas, just friendly asking: Are you still with me in this matter?
    Best, Peter

    Hello @sir-peter,

    I was just about to reply, I’ve been taking some time off to celebrate the new year.

    Could you please try to add the following anti-selector ( in the plugin settings: Dashboard > Meow Apps > Lightbox ):

    a[data-wpel-link="external"]

    It *might* work.

    Best regards,
    Thomas

    • This reply was modified 4 years, 11 months ago by Thomas.

    Dear Thomas,

    thank you very much. I was only kindly asking, being well aware, it could be your holiday. So sorry for this.

    It does not work unfortunately. My Anti Selector box does not like the formatting “/] it seems.

    Best, Peter

    Dear Thomas,

    it works like this:
    a[data-wpel-link=external]

    Thank you (!) and best regards,
    Peter

    I am having a similar issue …

    I’m building a photography site for myself hre:-

    https://raysphotos.uk

    I am using some pages as category landing pages like this one

    https://https://raysphotos.uk/styles

    As you can see I have a 3 column layout and I have linked the text underneath each image to the destination page and I have also linked the image to the same destination in the page editor.

    However – the Lightbox is overruling the link.

    I read through Sir-Peters issue and I cant see how I can achieve what I need.

    For example I do not want the lightbox to work on this page:

    https://raysphotos.uk/featured-content/airports/

    (this page has a post id of – post=908)

    Which is actually a post under a custom post type of ‘featured content’- but I DO want it to work on other posts under the same post-type such as this page:-

    https://raysphotos.uk/featured-content/birds/

    (this page has a post id of – post=775)

    So basically I need to be able to specify by the post-id which pages should and should not use the lightbox but insead look to the link set into the image so that when the image is clicked it goes to that URL I’ve added.

    How can I resolve this please.

    Thanks

    Ray

    • This reply was modified 4 years, 9 months ago by vintagegroup.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Meow Lightbox overriding Custom URL linking’ is closed to new replies.