Tagged: Lightbox, side navigation, titles
-
AuthorPosts
-
June 8, 2016 at 3:29 pm #644894
Hi guys
on the site below, in the section below “we get the job done”, I thought I would see the titles in the lightbox when opening the images from the portfolio grid, but I only see image numbers. Is there another setting to get titles/captions in the lightbox? Also wondering if I had an image with a video link, could there be a caption below the video when it’s open in the lightbox? RIght now when I test it there isn’t one.
thanks
Nancy- This topic was modified 8 years, 6 months ago by Munford.
June 9, 2016 at 7:14 pm #645658Hey Munford,
Try editing the attachments metadata in Media.
Best regards,
JosueJune 10, 2016 at 2:49 pm #646221I have done that. If wanted to have titles only on the videos/images in the lightbox and notas “titles/excerpts” underneath the image. If see I can have both…
June 10, 2016 at 3:50 pm #646253Hi,
Sorry it is not clear what you are trying to achieve please elaborate or if possible post us a screenshot/mockup of what you would like to achieve? You can upload the screenshot to imgur.com or dropbox and share the link here :)
Best regards,
VinayJune 13, 2016 at 5:54 pm #647558I would like to have the titles of my videos show up underneath the image when it opens in lightbox.
June 16, 2016 at 4:18 am #648951Hi,
I’m sorry but we can’t access the site. The lightbox can only display the title of the image but not the excerpt. Apply title to the images in the Media > Library panel.
Best regards,
IsmaelJune 16, 2016 at 9:16 am #649080Hi
I have given the images titles in the media library – caption and description areas as well – but they do not show up under the videos in lightbox. I do not want titles/excerpts under the images, only in the lightbox under the videos. Is that possible?
Thanks for taking a look
Nancy- This reply was modified 8 years, 6 months ago by Munford.
June 18, 2016 at 6:12 am #650091Hi,
Alright. I can see the issue now. Please edit the js > avia.js file and look for the “avia_activate_lightbox” function around line 916. Inside the function, look for this block of code:
image: { titleSrc: function(item){ var title = item.el.attr('title'); if(!title) title = item.el.find('img').attr('title'); if(!title) title = item.el.parent().next('.wp-caption-text').html(); if(typeof title == "undefined") return ""; return title; } },
Below that, add this:
iframe: { markup: '<div class="mfp-iframe-scaler">'+ '<div class="mfp-close"></div>'+ '<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+ '<div class="mfp-title">Some caption</div>'+ '</div>' },
Again, look for this line (966):
callbacks: {
Add this code underneath:
markupParse: function(template, values, item) { values.title = item.el.attr('title'); if(!values.title) values.title = item.el.find('img').attr('title'); if(!values.title) values.title = item.el.parent().next('.wp-caption-text').html(); if(typeof values.title == "undefined") return ""; },
Best regards,
IsmaelJune 21, 2016 at 10:09 am #651368so I guess that’s not the default setting! ;)
I will try that.
thanksJune 22, 2016 at 11:46 am #652026HI again
I added that code but am not seeing the change in Lightbox. ??
thanks for your help
NancyJune 23, 2016 at 4:01 am #652435Hey!
My bad. I duplicated the second block of code. We modified the code above. Please try it again.
Regards,
IsmaelJune 23, 2016 at 1:50 pm #652608great – that worked. I am now having another problem with the lightbox – side navigation.
I have this code:
/* disable side nav on trailers*/
#top .trailers img.mfp-img {
pointer-events: none;
}
.trailers .mfp-arrow {
display: none!important;
}
.trailers .mfp-counter {
display: none;
}
to disable the side nav on the .trailers images, but am not seeing it on the front end. I have cleared the cache, etc.
I was using the code before without the .trailers target, and it was fine, though I can’t get that to work now either.
??
thanks for your help
NancyJune 27, 2016 at 3:43 pm #653824Hi,
please open a new ticket for a new problem/issue, otherwise it’s getting too confusing.
I checked the link you’ve provided but can’t see any issues at all. Not sure what you want to achieve. Would you mind posting us a screenshot/mockup of what you would like to achieve? You can upload the screenshot to imgur.com or dropbox and share the link here :)
Best regards,
AndyJune 27, 2016 at 5:14 pm #653882I was trying to disable the side navigation in the lightbox on the link below in the corporate section. They are all videos. I was using the code above to hide the arrows, etc. but it’s not working now.
June 30, 2016 at 7:08 am #655115Hi,
I’m sorry but I can’t see the issue exactly. Could you please provide a screenshot? If possible, please create a new thread for this inquiry. Thank you.
Best regards,
IsmaelJune 30, 2016 at 9:08 am #655140If you look at the image below, when the lightbox is open to play the videos in the “corporate” section, there is still a side navigation (arrows) to go to the next video. I would like to disable that in this section (with ID #trailers”).
thanks
NancyJuly 3, 2016 at 4:59 am #656206Hi,
You can disable the arrow but not for a specific section. If you want to disable it for this specific page, use this:
.home button.mfp-arrow { display: none !important; }
Best regards,
IsmaelJuly 4, 2016 at 10:17 pm #656777OK good to know
thanks for your help.July 6, 2016 at 4:41 pm #657586Hi,
glad we could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.
Best regards,
Andy -
AuthorPosts
- The topic ‘lightbox titles / captions’ is closed to new replies.