Links in lightbox captions

Need is for a viewer to be able to bring up a lightbox image from a gallery thumbnail, then click to a web page from the lightbox image or lightbox caption.

When I place this in the caption field:

sample caption <a href="http://www.siteworkbench02.club”>click here

The resulting caption reads: sample caption

(and ignores the code snippet)

This is the web page I’m working with:

sample caption <a href="http://www.siteworkbench02.club”>click here

The top left image is the only captioned one.

This is the web page gallery that the client is trying to replicate:

https://stoneforest.com/pages/gallery

If the solution here is to pay someone for a custom bric , I’m happy to look at that.

Sorry if I am not following something, but…

<a href="url">link text</a>

You need to put this as it is, and then replace:

url with your URL.

And link text with the text you want to be linked to your url.

Check the sample project file attached below.

caption link.bloc (32.9 KB)

Thank-you, Eldar. That’s another beer on my tab.

I had followed your instructions in the way you intended, but it still ignored my link, while your sample worked fine.

After some experimentation, it’s working now, but I don’t know what changed.

All I can think is that I had a stray space or character causing problems.

Eldar, your link is styled differently than mine, so there must be a way to achieve that. I’m using a subclass to style the caption in general, but how do I style the link?

Hey @Samsdad, they are using Light Gallery on that website. Which is a really excellent lightbox library. Easy to create with, lots of good options (see the demo page), if you want to build something more substantial than the built in option.

Thank-you for taking a close look, Pete. I think I have what I need here, but if it becomes restrictive, I’ll take a second look at this. Appreciate your time very mch.

Just discovered your store. I’ll have to do some shopping.

1 Like

Got the bargain bundle.

I’ll have use for a lot of this immediately.

THX!

3 Likes

Thank you @Samsdad :smiley: for your support. The Creative Bundle is excellent value.

3 Likes