brad67
Forum Replies Created
-
Forum: Plugins
In reply to: [Ultimate Lightbox] How to show captions?Finally got time to debug the issue. It appears the code that supports “Images with Class Set Below” doesn’t include content in the lightbox. Here is the fix that got me in the right direction:
assets/js/ewd-ulb.js line 45:
+ if (description_src == 'caption') {var description = jQuery(this).parent().parent().find('figcaption').html();} + else {var description = img.attr(description_src);} +Line 50:
+ jQuery(this).parent().data('ulbdescription', description);I am using the “Add class to Elementor Image” plugin. This adds a “Custom Class” field when editing a image. I also needed to make sure that captions were turned on for each image under “Content”.
Not sure why the above code is not included as with my testing it doesn’t break anything else.
Forum: Plugins
In reply to: [Ultimate Lightbox] How to show captions?Yes I filled in all of the fields to make sure I wasn’t missing something. No caption is displayed in the lightbox.
That is correct. When I used just the plain wordpress gallery as well as “All Images” I can get captions to work when I disable Elementor Pro. I think this is related to using the “Images with Class Set Below” option.
Works with Elementor Pro disabled and “All Images” turned on:
<figure> <a href="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-scaled.jpg" data-elementor-open-lightbox="no" class="ewd-ulb-lightbox"><br> <img width="678" height="1024" src="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-678x1024.jpg" alt="Alt text" loading="lazy" srcset="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-678x1024.jpg 678w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-199x300.jpg 199w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-768x1160.jpg 768w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-1017x1536.jpg 1017w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-1356x2048.jpg 1356w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-600x906.jpg 600w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-scaled.jpg 1696w" sizes="(max-width: 678px) 100vw, 678px"> </a><figcaption>This is my test caption</figcaption></figure>This is with Elementor Pro enabled and using the “Images with Class Set Below”. The class is “bloody-mary-image”:
<div class="elementor-widget-container"> <figure class="wp-caption"> <a href="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-scaled.jpg" data-elementor-open-lightbox="no" class="ewd-ulb-lightbox"> <img width="678" height="1024" src="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-678x1024.jpg" class="bloody-mary-image attachment-large size-large" alt="Alt text" loading="lazy" srcset="http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-678x1024.jpg 678w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-199x300.jpg 199w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-768x1160.jpg 768w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-1017x1536.jpg 1017w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-1356x2048.jpg 1356w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-600x906.jpg 600w, http://dev.eyekandie.com/wp-content/uploads/2021/07/bacon-mary-scaled.jpg 1696w" sizes="(max-width: 678px) 100vw, 678px"> </a> <figcaption class="widget-image-caption wp-caption-text">This is my test caption</figcaption> </figure></div>I assume this is due to where the class “bloody-mary-image” is placed?
Thanks!
Forum: Plugins
In reply to: [Ultimate Lightbox] How to show captions?That’s not the issue. The problem is it does not display the caption text. I would like it to display the Title and Caption or Description under the photo like when I use the gallery.
Forum: Plugins
In reply to: [Ultimate Lightbox] How to show captions?Jay,
http://dev.eyekandie.com/bloody-marys/
I created the new page and did what you requested and I can see the captions displayed under the images. I tried many different variations using just images. I need to get it to work with just images.
If I set it to “All Images” then create a page and add a image or two the lightbox doesn’t work. Maybe you can see something I am missing. The dev console then gives and error of “img is not defined” tho I can see it in the code:
<img loading="lazy" width="678" height="1024" src="http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-678x1024.jpg" alt="" class="wp-image-577" srcset="http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-678x1024.jpg 678w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-199x300.jpg 199w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-768x1160.jpg 768w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-1017x1536.jpg 1017w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-1356x2048.jpg 1356w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-600x906.jpg 600w, http://dev.eyekandie.com/wp-content/uploads/2021/07/michalada-scaled.jpg 1696w" sizes="(max-width: 678px) 100vw, 678px">Been working on this a couple of days so hope you can help.
Thanks!
Forum: Plugins
In reply to: [Ultimate Lightbox] How to show captions?I am having a similar issue with title and captions. I can’t not get them to display. Tried adding a filter function. Tried many different options. I am using the “Images with Class Set below”. Verified “Show Overlay Text” is enabled. I am using Elementor Pro Edit Image. Then I added the “Add class to Elementor Image” plugin. This allows me to add my custom image class. I can see there is no title anywhere so not sure how to pass that to the lightbox. The gallery displays correctly. Just no caption, description, title or anything.
Second, how can you have the image icon scroll the images as you scroll the gallery instead of having to click the arrow?
Thanks!