Jump to content

Add a phone number net to the header button

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 5
  • Views 714
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted (edited)

@Barbi You can do this by adding another button to the header! Here's a tutorial: https://bycrawford.com/blog/enable-two-buttons-in-header-squarespace

If you want it to not look like a button (like the sample you shared), you can style the background to be white.

Edited by WCS

Did I help? Click 👍 or mark it as the solution! This helps others find the answers they need. 

Meghan | Westerly Creative Studio
  
 🍪  Still need your website policies?
Termageddon makes it easy.  
Get 10% off your first year! (< affiliate link) 

Link to comment

Thank you for your response! I need to have both the button and the number next to it, I circled it in this screenshot. The screenshots are from my client's old website, the new website on squarespace needs the phone next to the button not replacing the button. 

 

Thanks!

Screenshot 2024-05-28 at 15.57.13.jpg

Link to comment

To add phone number before Header Button, you can follow these steps

#1. 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 href="tel:1800077833" class="header-phone btn btn--border theme-btn--primary-inverse sqs-button-element--primary">1800 077 833</a>').insertBefore('a.btn');
});
</script>

image.thumb.png.dbcb3d88500b5057b5711b5a62aac388.png

You will have

image.png.42881b6f9405d1917f80e566a87a6847.png

#2. Use this code to Website Tools > Custom CSS

a.header-phone {
    background-color: transparent !important;
    color: #314972 !important;
}

image.png.c92d0bd3e63c46d3a6e53a127493ed13.png

image.thumb.png.cbf4fbe7cbe94f007b05d18ac3be5e6c.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

thank you for your response,  it worked! there is just a detail, the button cuts on the right side, is there a way to move it a bit to the left? 

Thanks!

Screenshot 2024-05-31 at 14.09.11.jpg

Link to comment
  • Solution
On 6/1/2024 at 12:11 AM, Barbi said:

thank you for your response,  it worked! there is just a detail, the button cuts on the right side, is there a way to move it a bit to the left? 

Thanks!

Screenshot 2024-05-31 at 14.09.11.jpg

Use this to Custom CSS

div.header-display-desktop .header-title-nav-wrapper {
    flex: 1 0 64% !important;
}

 

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

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.