Adding links to galleries

Hi,
I have a question about adding links to galleries. I seem to be unable to make clickable links.

Is there a trick to this?

What I want is a gallery that is able to produce a caption that has a link that can bew clicked and would take the user to a youtube video.

Thank you for any help!

Hi and welcome! Yes that is possible, and you’d do it by adding an anchor tag like

<a href="https://example.com">
  <img ...>
</a>

We’d be happy to take a look to assist – which gallery did you have in mind?

Hello Tyler,

I tried this before posting. It shows the entire text version of the code, but it does not create a link. I tried it in a few galleries. To demonstrate I have used Slider Timeline and took a screenshot. Thank you!

There are 2 parts to a mod: the content and the code. To add a link, you need to do it in the code (in this case the HTML), otherwise it will show up as text like you’re seeing.

Here is an example of the mod you sent with a link added. Feel free to clone it and use it!

Tyler, please forgive me, but i do not see the link added in the example…

If you view the code, it is starting on line 5. I changed it from a <div> to an <a> and added the href attribute :+1:

<a href="{{ link }}" class="swiper-slide" style="background-image:url({{ image }})" data-year="{{ year }}">
  <div class="swiper-slide-content">
    <span class="am-year">{{ year }}</span>
    <h4 class="am-title">{{ title }}</h4>
    <p class="am-text">{{ text }}</p>
  </div>
</a>