PrestonDesign Posted March 25, 2023 Share Posted March 25, 2023 I have the flatiron template. If you visit the link above, you'll see images in that gallery, but there are no titles for each image. I would like to add a title to each image, to inform the viewer of what they are looking at. Is this possible? Link to comment
tuanphan Posted March 31, 2023 Share Posted March 31, 2023 Hi, Which link? 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
PrestonDesign Posted April 8, 2023 Author Share Posted April 8, 2023 The link is here: https://www.preston.design/#/stow-ma-modern-lakehouse/ Each of the images does not have a title or description displayed. I would like the ability to do that. A one-liner just below each image would be sufficient. Link to comment
tuanphan Posted April 11, 2023 Share Posted April 11, 2023 Add this to Settings > Advanced > Code Injection > Footer This code will get ALT from Image & add ALT text under image <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(function(){ $('.gallery-item img[style]').each(function(){ $el = $(this); var style = $el.attr('style'); $el.attr('style',''); $el.parent().attr('style',style); }); //Moves the inline styles $(".gallery-item img").each(function(){ var title = this.alt; $('<div class="t-caption">'+ title +'</div>').insertAfter($(this).parent()); }); }); </script> <style> #project .gallery .gallery-item { margin-bottom: 10px; } </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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment