Jump to content

[Share] Remove End Time in Event Summary

Recommended Posts

To remove End Time of event in Event Summary

image.png.abc77458e3836aad2a62cb26c5051748.png

You can use this code to Website Tools > Code Injection > Footer.

If it doesn't work, you can send link to page where you have problem, I will check it again.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $(".event-time-localized").each(function() {
    console.log($(this).text())
    var currentText = $(this).text();
    var currentTextArr = currentText.split("–")
    if(currentTextArr.length == 2) {
      $(this).text(currentTextArr[0])
    }    
  });
})
</script>

image.png.f91aabd84f19eaf8e955d0cdb9da4792.png

Result

image.png.13c9867759fdaa6ae672c10c4ae37eb3.png

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
  • Replies 0
  • Views 200
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • 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.