Buy me a coffee

Change Button Text/URL (One Page)

In the example code:

  • Donate is the current button text. You need to change it to your current button text.
  • new text is new button text. You can change it to new text
  • Google.com is an example URL. You can change it to the URL that you want

One Page

#1. Enter this code in the Page Header Code Injection and click Save 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("a.btn").html(function() { 
          return $(this).html().replace("Donate", "new text");  
    });
  $("a.btn").attr('href','https://google.com');
});
</script>

change-button-text-url-one-page-01-min

#2. You will have a result like this

change-button-text-url-one-page-02-min

Cart Page

#1. Add this code to Code Injection > Footer and click Save

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $("body#cart a.btn").html(function() { 
          return $(this).html().replace("Donate", "new text");  
    });
  $("body#cart a.btn").attr('href','https://google.com');
});
</script>

change-button-text-url-cart-page-01-min

 

#2. You will have a result like this

change-button-text-url-cart-page-02-min

Paywall Page

#1. Add this code to Code Injection > Footer and click Save

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $('#sqs-paywall-page-root').closest('body').addClass('paywall-body');
    $("body.paywall-body a.btn").html(function() { 
          return $(this).html().replace("Donate", "new text");  
    });
  $("body.paywall-body a.btn").attr('href','https://google.com');
});
</script>

change-button-text-url-paywwall-page-01-min

#2. and result like this.

change-button-text-url-paywwall-page-02-min

Ask me a question, free

If your site is private or in trial, just setup password and share url. See how to: https://beaverhero.com/squarespace-how-to/
Please check your email carefully. Recently I got a lot of questions with wrong emails.

If you haven't heard from me within 24 hours please check your junk/spam folder