How can I add two CTA buttons linking to different URLs in one section?

Hi!

I’ve been trying to find a way to add two buttons on the bottom of a page that links to two different URLs in one section. I currently have the code below that makes 1 CTA button but I’m unsure how to make 2 buttons in one section that links to different pages. Hope you can help me!

Thanks!


---

  ###  {{ section.settings.text-box }} 
  {{ section.settings.linktext }}

---

{% schema %}
{
  "name": "Call to action",
  "settings": [
    {
      "id": "text-box",
      "type": "text",
      "label": "Heading",
      "default": "Title"
    },
    {
      "id": "link",
      "type": "url",
      "label": "Button link"
    },
    {
      "id": "linktext",
      "type": "text",
      "label": "Button text",
      "default": "Click Here"
    }
  ]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}
1 Like

Hello, @hellocharlotte

Welcome to the Shopify community!
and Thanks for your Good question.

Please share your site URL,
So I will check and provide a solution here.

1 Like

Hi! This is our website

https://www.omni.community/

@hellocharlotte

Thanks

can you please try this


---

  ###  {{ section.settings.text-box }} 
  {{ section.settings.linktext }}
 {{ section.settings.linktext2 }}

---

{% schema %}
{
  "name": "Call to action",
  "settings": [
    {
      "id": "text-box",
      "type": "text",
      "label": "Heading",
      "default": "Title"
    },
    {
      "id": "link",
      "type": "url",
      "label": "Button link"
    },
    {
      "id": "linktext",
      "type": "text",
      "label": "Button text",
      "default": "Click Here"
    },
 {
      "id": "link2",
      "type": "url",
      "label": "Button link 2"
    },
{
      "id": "linktext2",
      "type": "text",
      "label": "Button text 2",
      "default": "Click Here 2"
    }
  ]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}
1 Like

@KetanKumar You are a lifesaver!!! Thank you so much!

Now I’m wondering if the 2nd button could be moved to the right side of the page and with it’s own Title. Is that possible?

1 Like

@hellocharlotte

Yes, for update

can you please let me know how to do you exactly look so I will guide you?

1 Like

Something like this if it’s possible!

1 Like

@hellocharlotte

Yes, is possible make some more customization code HTML, CSS and liquid code can you please send PM

1 Like