Jump to content

Image captions as Links

Recommended Posts

Hello everyone,

I want to make a starting page as an overview portfolio page that opens in a lightbox that one could browse through the portfolio photos. However, I would like that each photo, when open in the lightbox, has a caption below that says "View Project" and takes you to the page of that specific project.

So basically, I need to:

a. Turn captions into links (for some reason a simple hyperlink leads to all kinds of errors as it ads the link url after the page's url) and

b. Make captions appear only in the lightbox. 

I am at the very beginning of building the page so have nothing to show yet (and no extra code has been added yet) but any help would be highly appreciated. 

Thank you in advance,

Elena

 

PS: example of the desired result attached 

Screenshot 2022-08-27 at 22.27.49.png

Link to comment

Hi,

First, you need to use Gallery Section

Next, enable Gallery Section Caption

Next, each each gallery image >> enter this code into Description box

<a href="https://google.com">View Project: Momo</a>

Do similar for other image

Next, share link to page where you added Gallery Section, we will test some code to make link appear in lightbox only

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Hi @tuanphan

I'm having the same issue with turning gallery captions (I'm using masonry) into clickable links. I tried your code above, but it's not redirecting to the linked website.

I'd also like to add an overlay over the images that have titles/buttons under them - is this possible?

Here's the page I'm working on: www.thehmnco.com/our-work

 

Thank you!

Link to comment

Site URL: https://www.thehmnco.com/our-work

Hi everyone!

I am working on my portfolio and decided to turn the gallery captions into clickable buttons since image text overlays don't work the best on mobile. I need help with:
1. Making the text clickable -- yes, the gallery gives the option to add a link per image, but it doesn't turn the text "buttons" into clickable links like it would on text boxes.

2. Since the entire gallery is one box element, is there a way to target each individual caption and make the "button" into a different color (1 color per bottom, so all buttons are different colors)?

3. Caption alignment: any time I try to reduce top or bottom margin, instead of moving up or down, the text starts cutting off. 

 

Thank you for all the help in advance!

image.thumb.png.5e4eb4c03084274055866e7c9b05ff0e.pngon

Link to comment
On 8/28/2022 at 3:07 PM, tuanphan said:

Hi,

First, you need to use Gallery Section

Next, enable Gallery Section Caption

Next, each each gallery image >> enter this code into Description box

<a href="https://google.com">View Project: Momo</a>

Do similar for other image

Next, share link to page where you added Gallery Section, we will test some code to make link appear in lightbox only

Thank you so much! I dont why others (though looked the same) didnt but this code worked like a charm. 
Will get back with the link once I upgrade the account. 
Thanks again!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.