Jump to content

Code no longer works for showing image name/titles in galleries? Help please

Recommended Posts

Posted

Site URL: http://www.maddieparkerphotography.com/

I have been using the following code for a number of years. I'm a photographer that uploads a number of images into a gallery. By using this code, it usually saves me a lot of time by displaying the image name/titles underneath (rather than me having to go through and individual type in each title for each image). Up until today, it's decided not to work anymore. I usually place the code at the bottom of an individual page underneath the uploaded gallery. 

This is the code:  

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
 <script>
   $('.slide img').each(function(i) {
     $('.image-slide-title').eq(i).html('' + $(this).attr('alt').replace('.jpg', '') + '');
   });
 </script>

 

However it no longer works. Please does anyone have a new code that still works please? Or anyone that is good at coding that could help me alter mine to work? I'm really not very good at coding so don't know what to do.

Thanks

  • Replies 6
  • Views 645
  • Created
  • Last Reply
Posted

I think it's a bug, all alt text is also not showing on gallery blocks and sections.

If an answer I provide helps you, please mark it as the answer so others can easily access it as well.

I'm a Squarespace Authorized TrainerSquarespace Expert, and Circle Member and I've been helping my clients as well as those here in the forum and in various Squarespace groups with custom coding and support for Squarespace websites. I would love to help you in any way I can.

Squarespace PluginsBook Live Help | Squarespace Video Tutorials | Buy Me a Coffee

Posted

I've checked four pages and I'm not finding the code installed. Can you point us to a specific page you know that code has been installed? Are you installing the code via a code block at the end of the page?

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted

Hi @creedonand @Vigasan

 

When on the page I am creating, underneath a gallery block I am then adding a 'code' block at the end of the page. Then I am pasting the above code in. Usually once saved the image titles/names appear. 

 

The pages I am using them on are password protected as they are my client galleries. Would I be able to message you @creedonwith the details to access one? 

 

Thanks

Posted

@MaddieParker To reiterate what others have said, this is Squarespace Bug. There's supposed to be an attribute called the ALT tag on every image on every webpage. Unfortunately, Squarespace have made an update and these tags are now missing - on all sites that I've tested.

There's nothing any of us can do to fix this. You'll need to wait until Squarespace acknowledge this and then fix it.

I logged a support ticket with Customer Care but they seemed to be completely unaware of it. I recommend that you also get in touch with Squarespace Customer Care. I wouldn't mention custom code (they don't assist with this) but you can tell them that ALT tags are missing from your images. You can reach out to them here.

Update: Fixed on Friday 25 June.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.