Add a custom button in main menu

Hi,

I want to add a custom button with the words “Buy Now” and a link to my product. How do this, my theme is refresh.

My website: www.cardtag.net

@cardtag

Let me know that where you want to add that custom button in your site ?

so i can tell you as per your requirement !

I want to the most right. Right of cart. Did this help?

Hi @cardtag

Can you kindly provide detailed information about what you want to adjust (screenshots)? We will check it and suggest you a solution.

The Buy Now button i imagine to look like this.

Hi @cardtag

Please find the header.liquid file and find the

tag with the class header__icons. Then, paste

this code in the found tag:

Buy Now

This is the result that we tested, you can change the URL to be able to link to your favorite product

We hope that this can help you.

Hi,

It works great but it needs to be deactivated on mobile because it looks
very bad on mobile. Can we do something about this?

Hi @cardtag

Please add the button–mobile class to the previously added button:

Buy Now

then add this CSS inside tag in header.liquid:

@media screen and (max-width: 750px) {
    .button--mobile{
      display: none;  
    }
  }

We hope that this can help you.