-
AuthorPosts
-
August 9, 2014 at 8:22 am #81204
Dear support
What’s the best way for an image to appear in Lightbox from a text link?
Regards,
NielsAugust 9, 2014 at 8:51 am #81214Hi Niels,
Thanks for writing in! There is a great lightbox shortcode walkthrough available – http://theme.co/x/member/kb/shortcode-walkthrough-lightbox/I would recommend watching this and coming back if you have additional questions.
August 10, 2014 at 11:04 am #81687Hi
Watched it but it does not say anything about Lightbox images from a text link.
Note that I work in Classic Composer and do not use WYSIWYG but HTML mode.
I’ve downloaded a plugin called “Lightbox Plus Colorbox”. That seems to do the job but I was wondering how to let an image in Lightbox appear whem clicked on a text link using Theme X coding.
Thanks in advance!
Regards,
NielsAugust 10, 2014 at 11:49 am #81705Hi Niels,
Here is the code that I use in Classic Editor:
<a href="http://localhost:8888/x/wp-content/uploads/2014/08/slide1.jpg" class="link-lightbox">Trigger LightboX!</a> [lightbox selector=".link-lightbox"]
The href for the link is connected to a url for an image 🙂
Thanks.
August 10, 2014 at 12:19 pm #81714Ah, thanks very much.
You’re the best!
August 10, 2014 at 2:35 pm #81752You’re welcome Neils!
December 6, 2015 at 3:14 am #694068Hi,
how do you do a text triggered lightbox in topbar (Topbar Content)?Trigger LightboX!
[lightbox selector=”.link-lightbox”]—> That won’t work! -> [all text in brackets are shown…??]
December 6, 2015 at 3:20 am #694072Hello There,
Thanks for updating this thread! Regretfully shortcodes will not work in your topbar content. If you want to have a link that will trigger a lightbox, you have to manually code it using plain html. Please insert this code instead:
<a class="link-lightbox" href="http://bergfrieden.at/webcam/Leutasch-Webkamera-Livebild-Gross.jpg" rel="nofollow">Trigger LightboX!</a><br> <span id="x-lightbox-1" data-x-element="lightbox" data-x-params="{"selector":".link-lightbox","deeplink":false,"opacity":"0.85","prevScale":"0.85","prevOpacity":"0.65","nextScale":"0.85","nextOpacity":"0.65","orientation":"horizontal","thumbnails":false}"></span>
Hope this helps.
April 11, 2016 at 9:49 pm #877505<a href="http://localhost:8888/x/wp-content/uploads/2014/08/slide1.jpg" class="link-lightbox">Trigger LightboX!</a> [lightbox selector=".link-lightbox"]
This code works well, thanks Christopher, but what I want to achieve is this:
In this example, I’d click ‘Trigger LightboX!’ and it would open up a lightbox, but it would have multiple images in rotation (not just the one that appears as per the above code.
How can I achieve a multi-image lightbox being triggered from a single text link?
April 12, 2016 at 6:46 am #878100Hi,
Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
-
AuthorPosts