Jump to content

How can I change the text on the header button (call to action) on a single page?

Go to solution Solved by Lesum,

Recommended Posts

I created a custom translated website without using Weglot (wanted specific word for the translations) and I'm trying to change the "Donate" button on the Spanish language pages. How can I change that verbiage on a single page at a time?

Screenshot 2024-06-09 at 9.27.05 AM.png

Link to comment
  • Replies 4
  • Views 189
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Solution

@blakemwilson Add this code under Website > Pages > Website Tools > Code Injection > Header

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $('#collection-666306082a0f2d4434d684bc .btn').text("custom text");
});
</script>

You've to replace "custom text" in the code.

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment

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.