Using Code and HTML in Image Titles on Squarespace

Back in September of 2018, Squarespace decided to no longer allow code / HTML in image titles. Here's a fix to give you back that functionality. Simply enter this code into SETTINGS > ADVANCED > CODE INJECTION.

If you have AJAX LOADING on your website, disable that first by going to DESIGN > SITE STYLES and unchecking the option for AJAX LOADING (only some of the newer templates have this option so if you're using an older template, you can ignore this step).

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script>
$(function(){
  $(".image-slide-title").each(function(){
    $(this).html($(this).text());
  });
});
</script>
P.S. You may have to change ".image-slide-title" depending on how you're using titles.

By using the above code, you can easily add a new line to image titles, or have multiple lines of text for image titles in Squarespace. To add a new line, just use <br/> in your image title. So something like “First Line<br/>Second Line”.

Vigasan

Hey! I’m Vigasan and I love the Internet. I have a Bachelor of Science in Computing Systems with a double specialization in Computer Science and Software Engineering. I’ve been creating websites and working with social media since 2014 and have created over 200 Squarespace websites so far.

https://www.adlyticmarketing.com/
Previous
Previous

Creating an Accordion Style FAQ Section on Squarespace

Next
Next

How We Got Started with Our Business on Fiverr