# Can not link any text or button

**URL:** <https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933>\
**Category:** Ask the community\
**Tags:** question, design, wix\
**Created:** [August 20, 2025, 7:26pm UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933 "2025-08-20T19:26:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richie2](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/richie2/32/110028_2.png) [@Richie2](https://forum.wixstudio.com/u/Richie2)\
**Post date:** [August 20, 2025, 7:26pm UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/1 "2025-08-20T19:26:21Z")

</div>

**I’m having trouble with**  
I can not link text or button to anything/ All buttons and text will not let me link them.

**Working in**  
Wix Editor

**Site link**

> **[Heppells Chocolatier Patissier | Chocolate | Desserts | Afternoon Tea |...](https://rheppells.wixsite.com/website-3)**
>
> International award winning UK Chocolatier Patissier. Heppells is the place to buy desserts, luxury afternoon tea, entremets and cakes, chocolate gifts, corporate gifts and wholesale. Lincolnshire & Nationwide UK.

**What I’m trying to do**  
add a link to my text and buttons

**What I’ve tried so far**  
I click on choose link and the window does not open to link to page, URL etc

**Happens to all text and buttons and I have cleared my cache, deleted buttons and added new ones. I have buttons on other pages which I had to create on another site which I copied and pasted them over. However, this is only useful if I want to link to a URL and not a page within my site.**

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [August 21, 2025, 12:41am UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/2 "2025-08-21T00:41:10Z")

</div>

Hi, @Richie2 !!

Hmm, it might just be a temporary glitch with the editor. Since it’s also possible to configure it using code, why not give that a try? 😇

> **[Link | Velo](https://dev.wix.com/docs/velo/velo-only-apis/$w/button/link)**
>
> Sets or gets the button's link. When the button is clicked, the browser navigates to the link location.

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [August 21, 2025, 3:09am UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/3 "2025-08-21T03:09:11Z")

</div>

Alternatively, you could use code like this to set links for both button elements and text elements all at once, which can be really convenient. Feel free to give it a try if you’re interested! 🙌

```javascript

import wixLocation from "wix-location";

$w.onReady(() => {

  const elementLinks = {
    text0: "https://amazon.com",
    text1: "/page-1",
    button1: "https://yahoo.co.jp"
  };

  setLinks(elementLinks);

});

function setLinks(elementLinks) {
  for (const [id, url] of Object.entries(elementLinks)) {
    $w(`#${id}`).onClick(() => wixLocation.to(url));
  }
}

```

---

<div class="post-metadata">

**Author:** ![Richie2](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/richie2/32/110028_2.png) [@Richie2](https://forum.wixstudio.com/u/Richie2)\
**Post date:** [August 21, 2025, 4:27pm UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/4 "2025-08-21T16:27:37Z")

</div>

Thanks i will give it a try.  
Surely, someone from wix can fix this issue as I can add links on another site with wix editor

---

<div class="post-metadata">

**Author:** ![Richie2](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/richie2/32/110028_2.png) [@Richie2](https://forum.wixstudio.com/u/Richie2)\
**Post date:** [August 21, 2025, 6:10pm UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/5 "2025-08-21T18:10:33Z")

</div>

> [@onemoretime](#):
>
> ```javascript
> import wixLocation from "wix-location";
> 
> $w.onReady(() => {
> 
> const elementLinks = {
> text0: "https://amazon.com",
> text1: "/page-1",
> button1: "https://yahoo.co.jp"
> };
> 
> setLinks(elementLinks);
> 
> });
> 
> function setLinks(elementLinks) {
> for (const [id, url] of Object.entries(elementLinks)) {
> $w(`#${id}`).onClick(() => wixLocation.to(url));
> }
> }
> 
> ```

The code does not work

---

<div class="post-metadata">

**Author:** ![onemoretime](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/onemoretime/32/104023_2.png) [@onemoretime](https://forum.wixstudio.com/u/onemoretime)\
**Post date:** [August 22, 2025, 12:42am UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/6 "2025-08-22T00:42:10Z")

</div>

Did you customize this part to fit your environment before running it? 🙌

```javascript
  const elementLinks = {
    text0: "https://amazon.com",
    text1: "/page-1",
    button1: "https://yahoo.co.jp"
  };

```

You need to change `text0` and `text1` to the IDs of the text elements on your site’s page, and likewise, `button1` should be replaced with the ID of the button element on your site’s page. Of course, three elements won’t be enough, so you’ll need to add more element names and corresponding destination URLs as needed. 🙂

By the way, “/page-1” is also just an example to show how to navigate between pages within your site. Please check the URL slug of your own site’s page and replace it accordingly. 😁

> **[To | Velo](https://dev.wix.com/docs/velo/apis/wix-location-frontend/to)**
>
> Directs the browser to navigate to the specified URL. The to() method navigates the browser to another web page.

---

<div class="post-metadata">

**Author:** ![noahlovell](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/noahlovell/32/118920_2.png) [@noahlovell](https://forum.wixstudio.com/u/noahlovell)\
**Post date:** [August 22, 2025, 10:05am UTC](https://forum.wixstudio.com/t/can-not-link-any-text-or-button/72933/7 "2025-08-22T10:05:21Z")

</div>

When you say “can not link text or button to anything” - what does that mean practically?

Are you trying to link to a specific page and it won’t let you? Is it giving an error, not showing the option or something else?
