meg-nowak Posted February 5 Share Posted February 5 This is for a photographer who uploaded many images onto a gallery page and is trying not to manually insert titles for all images. The files are named, so they are looking to have the filenames (alt tag) show somewhere under each image (easiest I'm guessing would be in the image title or description fields). The site is in the Wells template in version 7.0. Is this possible? Nothing I've tried has worked yet. If not possible, any other suggestions are welcome! Much appreciated! Link to comment
tuanphan Posted February 7 Share Posted February 7 Can you share site url? I think we can try something Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
meg-nowak Posted February 7 Author Share Posted February 7 Of course! Thanks in advance, URL below: markrockwoodphotography.com/photobackgrounds Link to comment
tuanphan Posted February 11 Share Posted February 11 Add this code to last line in Code Injection > Footer <script> $(function(){ $(".slide img").each(function(){ var title = this.alt; $('<span class="t-caption">'+ title +'</span>').insertAfter($(this).parent()); }); }); </script> <style> div.slide + .t-caption { display: none !important; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 999999; } div.slide.sqs-active-slide + .t-caption { display: block !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
meg-nowak Posted February 12 Author Share Posted February 12 I placed that code in the Footer Code Injection (screenshot attached) and am not seeing that on my end. Link to comment
tuanphan Posted February 15 Share Posted February 15 Add this line to top of code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Carrot16 Posted March 9 Share Posted March 9 Hi, I am also having the same problem. I would like the image file name to show under each image, without having to manually insert them. I have tried the following injection code. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(function(){ $(".slide img").each(function(){ var title = this.alt; $('<span class="t-caption">'+ title +'</span>').insertAfter($(this).parent()); }); }); </script> <style> div.slide + .t-caption { display: none !important; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 999999; } div.slide.sqs-active-slide + .t-caption { display: block !important; } </style> Thank you for any help you could offer! Link to comment
tuanphan Posted March 13 Share Posted March 13 On 3/9/2024 at 5:32 PM, Carrot16 said: Hi, I am also having the same problem. I would like the image file name to show under each image, without having to manually insert them. I have tried the following injection code. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(function(){ $(".slide img").each(function(){ var title = this.alt; $('<span class="t-caption">'+ title +'</span>').insertAfter($(this).parent()); }); }); </script> <style> div.slide + .t-caption { display: none !important; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 999999; } div.slide.sqs-active-slide + .t-caption { display: block !important; } </style> Thank you for any help you could offer! Can you share link to your site? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment