Title not showing in Lightbox
-
Can you have a look at the link and let me know what I am doing wrong?
I was hoping the title would appear in the text, all I see is “n of n”
The page I need help with: [log in to see the link]
-
Hi, it appears that a plugin or theme’s caching functionality is modifying the loading of scripts on the page, preventing SLB from being properly loaded.
You can confirm this by temporarily disabling the caching functionality, clearing all site/browser caches, and reloading the page.
If you are still experiencing an issue with SLB after disabling the caching functionality, please provide an updated link and I would be glad to take another look.
Thanks.
I disabled all the plugins and turned off all the caching I could find but could not see the titles
Can you narrow it down further for me?
I am on Siteground and they have on the server NGINX DIRECT DELIVERY, DYNAMIC CACHE and MEMCACHED. I can turn off NGINX DIRECT DELIVERY and MEMCACHED on the server. I have their plugin SG_OPTIMISER and can turn off Dynamic Caching, File-Based Caching and Memcached but this did not work. I do not think I have other Caching
I cleared the Chrome browser cache
I have turned everyrthing back on but if you need to test it with these things switched off we would need to organise a time slot
I realise now that I am using Simple Lightbox on my main domain (ebps.org.uk) but I have stored the images on my subdomain (payments.ebps.org.uk)
Would this be the reason the captions are not showing?
This is an example of the code I am using in ebps.org.uk
<a ><img title="#01 - Equisetum palustre" src="https://payments.ebps.org.uk/wp-content/uploads/vfb/2023/03/Equisetum-palustre-scaled-1.jpg" /></a>
OK, I changed the page displaying the images to be on the subroutine and now it finds the caption on most of the images but not all. I had thought that it could not find the caption on images where I had used WordPress Media to rotate the image as in image #1. But image #2 has not been altered and it also does not show the caption
https://payments.ebps.org.uk/pictures/
- This reply was modified 1 year, 7 months ago by Andrew Leonard.
OK, if the Caption has one word, Simple Lightbox cannot find it or refuses to show it, so if the caption is “Fan” it is not shown (item 27) but “Fan x” is displayed. Item #2 caption is “Dicranopteris” which is not displayed
It sounds like SLB displaying images in the lightbox for you at the link you provided, but it strangely SLB is still being prevented from fully loading due to the issues noted in my previous response.
It looks like a file generated by a “SiteGround Optimizer” plugin contains cached JavaScript code and is being loaded out of order on the page, causing issues with JS code that comes after it (including SLB). Disabling this code caching, or at least excluding
jquery
from being included in this cached file may allow SLB to be loaded fully.Any issues you may be experiencing with SLB may be the result of this, so resolving the loading is essential. Please post an update if you are still experiencing an issue once SLB is loading properly, and I would be glad to take another look.
Hi, are you still experiencing an issue with SLB? If so, please provide an updated link with jQuery and SLB loading properly, and I would be glad to take another look.
This ticket will be closed in 24 hours due to inactivity.
Today, the lightbox function is only working when I am logged in….
and I have just found out why, I had
“Defer Render-blocking JavaScript
Defer loading of render-blocking JavaScript files for faster initial site load.”turned on in Siteground Optimiser and that f***ed things up
I have turned it off and SLB works again
The captions work but not if I have editted the images using WordPress Media
Hi, glad to hear that you found what was causing the JavaScript issues on your site.
I can confirm that SLB is also working when I view the link provided and that the captions are working for links to original/unmodified images.
As you note, captions for modified images are not displayed. This is because WordPress currently does not associate these modified images with the media library, so the caption for the original image is not accessible.
As a result, performing all edits prior to uploading images to WordPress’ media library is recommended so that the metadata (captions, descriptions, etc.) is accessible to SLB. A workaround for existing images is either to edit and reupload the modified images and/or ensure that you are linking to the original image.
Thank you for your reply
Another slight “bug” is that the caption is not displayed if it is a single word.
e.g. “Fan” does not display but “Fan .” does
It seems you are looking for a space character?
The caption should be displayed regardless of the number of words.
Please provide a link to a page that exhibits this issue (ideally containing 2 images: one with a single word set for the caption), and I would be glad to take a look.
#26 Fan is in the third column 5 down
See #26 Fan – Caption is “fan .” SLB shows “fan .Item 26 of 112″
https://payments.ebps.org.uk/bps-photographic-competition-2023/pictures/
See #26 Fan – Caption is “fan2” SLB shows “Item 26 of 112″
The title is not used for the 2nd example because “
fan2
” is the default title generated by WordPress when that image was uploaded.Most users do not want this default title displayed because it usually looks too much like a file name, but if you want the default title to be used, just enable the “Enable default title” option in SLB’s settings.
- The topic ‘Title not showing in Lightbox’ is closed to new replies.