(Squarespace) Add a Text item to Portfolio Grid

To add a custom text item to Portfolio Page - Grid, like this

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

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('<a class="grid-item grid-custom-text"><span>You know what? It is beets. I have crashed into a beet truck. Jaguar shark! So tell me - does it really exist?</span></a>').prependTo('div#gridThumbs');
});
</script>
<style>
a.grid-item.grid-custom-text {
    position: relative;
}
a.grid-item.grid-custom-text span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
}
</style>
2 Likes